"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/umask/package.json" (7 Feb 2017, 3464 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) JSON source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {
    2   "_from": "umask@>=1.1.0 <1.2.0",
    3   "_id": "umask@1.1.0",
    4   "_location": "/umask",
    5   "_nodeVersion": "0.10.35",
    6   "_npmUser": {
    7     "name": "smikes",
    8     "email": "smikes@cubane.com"
    9   },
   10   "_npmVersion": "2.2.0",
   11   "_phantomChildren": {},
   12   "_requiredBy": [
   13     "/npm"
   14   ],
   15   "_resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz",
   16   "_shasum": "f29cebf01df517912bb58ff9c4e50fde8e33320d",
   17   "_shrinkwrap": null,
   18   "author": {
   19     "name": "Sam Mikes",
   20     "email": "smikes@cubane.com"
   21   },
   22   "bugs": {
   23     "url": "https://github.com/smikes/umask/issues"
   24   },
   25   "dependencies": {},
   26   "description": "convert umask from string <-> number",
   27   "devDependencies": {
   28     "code": "^1.2.1",
   29     "jslint": "^0.7.2",
   30     "lab": "^5.2.0"
   31   },
   32   "directories": {},
   33   "dist": {
   34     "shasum": "f29cebf01df517912bb58ff9c4e50fde8e33320d",
   35     "tarball": "http://registry.npmjs.org/umask/-/umask-1.1.0.tgz"
   36   },
   37   "gitHead": "63d821e4d0b06ef9a4b727c5fbe5976e9534d76e",
   38   "homepage": "https://github.com/smikes/umask",
   39   "keywords": [
   40     "umask"
   41   ],
   42   "license": "MIT",
   43   "main": "index.js",
   44   "maintainers": [
   45     {
   46       "name": "smikes",
   47       "email": "smikes@cubane.com"
   48     }
   49   ],
   50   "name": "umask",
   51   "optionalDependencies": {},
   52   "readme": "# umask\n\nConvert umask from string &lt;-> number.\n\n## Installation & Use\n\n```\n$ npm install -S umask\n\nvar umask = require('umask');\n\nconsole.log(umask.toString(18));        // 0022\n\nconsole.log(umask.fromString('0777'))   // 511\n```\n\n## API\n\n### `toString( val )`\n\nConverts `val` to a 0-padded octal string.  `val` is assumed to be a\nNumber in the correct range (0..511)\n\n### `fromString( val, [cb] )`\n\nConverts `val` to a Number that can be used as a umask.  `val` can\nbe of the following forms:\n\n  * String containing octal number (leading 0)\n  * String containing decimal number\n  * Number\n\nIn all cases above, the value obtained is then converted to an integer and\nchecked against the legal `umask` range 0..511\n\n`fromString` can be used as a simple converter, with no error feedback, by\nomitting the optional callback argument `cb`:\n\n```\n   var mask = umask.fromString(val);\n\n   // mask is now the umask descibed by val or\n   // the default, 0022 (18 dec)\n```\n\nThe callback arguments are `(err, val)` where `err` is either `null` or an\nError object and `val` is either the converted umask or the default umask, `0022`.\n\n```\n   umask.fromString(val, function (err, val) {\n       if (err) {\n          console.error(\"invalid umask: \" + err.message)\n       }\n\n       /* do something with val */\n   });\n```\n\nThe callback, if provided, is always called **synchronously**.\n\n### `validate( data, k, val )`\n\nThis is a validation function of the form expected by `nopt`.  If\n`val` is a valid umask, the function returns true and sets `data[k]`.\nIf `val` is not a valid umask, the function returns false.\n\nThe `validate` function is stricter than `fromString`: it only accepts\nNumber or octal String values, and the String value must begin with `0`.\nThe `validate` function does **not** accept Strings containing decimal\nnumbers.\n\n# Maintainer\n\nSam Mikes <smikes@cubane.com>\n\n# License\n\nMIT",
   53   "readmeFilename": "README.md",
   54   "repository": {
   55     "type": "git",
   56     "url": "git+https://github.com/smikes/umask.git"
   57   },
   58   "scripts": {
   59     "lint": "jslint --terse --latest *.js test/*.js",
   60     "test": "lab -ct 100"
   61   },
   62   "version": "1.1.0"
   63 }