Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
atom / usr / share / atom / resources / app / apm / node_modules / umask / package.json
Size: Mime:
{
  "_from": "umask@>=1.1.0 <1.2.0",
  "_id": "umask@1.1.0",
  "_location": "/umask",
  "_nodeVersion": "0.10.35",
  "_npmUser": {
    "name": "smikes",
    "email": "smikes@cubane.com"
  },
  "_npmVersion": "2.2.0",
  "_phantomChildren": {},
  "_requiredBy": [
    "/npm"
  ],
  "_resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz",
  "_shasum": "f29cebf01df517912bb58ff9c4e50fde8e33320d",
  "_shrinkwrap": null,
  "author": {
    "name": "Sam Mikes",
    "email": "smikes@cubane.com"
  },
  "bugs": {
    "url": "https://github.com/smikes/umask/issues"
  },
  "dependencies": {},
  "description": "convert umask from string <-> number",
  "devDependencies": {
    "code": "^1.2.1",
    "jslint": "^0.7.2",
    "lab": "^5.2.0"
  },
  "directories": {},
  "dist": {
    "shasum": "f29cebf01df517912bb58ff9c4e50fde8e33320d",
    "tarball": "http://registry.npmjs.org/umask/-/umask-1.1.0.tgz"
  },
  "gitHead": "63d821e4d0b06ef9a4b727c5fbe5976e9534d76e",
  "homepage": "https://github.com/smikes/umask",
  "keywords": [
    "umask"
  ],
  "license": "MIT",
  "main": "index.js",
  "maintainers": [
    {
      "name": "smikes",
      "email": "smikes@cubane.com"
    }
  ],
  "name": "umask",
  "optionalDependencies": {},
  "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",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/smikes/umask.git"
  },
  "scripts": {
    "lint": "jslint --terse --latest *.js test/*.js",
    "test": "lab -ct 100"
  },
  "version": "1.1.0"
}