motion
Version:
motion - moving development forward
80 lines (79 loc) • 3.72 kB
JSON
{
"_args": [
[
"read-pkg@https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "read-pkg@>=1.0.0 <2.0.0",
"_id": "read-pkg@1.1.0",
"_inCache": true,
"_location": "/read-pkg",
"_phantomChildren": {},
"_requested": {
"name": "read-pkg",
"raw": "read-pkg@https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"rawSpec": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"type": "remote"
},
"_requiredBy": [
"/read-pkg-up"
],
"_resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"_shasum": "f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28",
"_shrinkwrap": null,
"_spec": "read-pkg@https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"email": "sindresorhus@gmail.com",
"name": "Sindre Sorhus",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/read-pkg/issues"
},
"dependencies": {
"load-json-file": "^1.0.0",
"normalize-package-data": "^2.3.2",
"path-type": "^1.0.0"
},
"description": "Read a package.json file",
"devDependencies": {
"ava": "*",
"xo": "*"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"homepage": "https://github.com/sindresorhus/read-pkg#readme",
"keywords": [
"file",
"fs",
"graceful",
"json",
"load",
"normalize",
"package",
"parse",
"pkg",
"read"
],
"license": "MIT",
"name": "read-pkg",
"optionalDependencies": {},
"readme": "# read-pkg [](https://travis-ci.org/sindresorhus/read-pkg)\n\n> Read a package.json file\n\n\n## Why\n\n- [Gracefully handles filesystem issues](https://github.com/isaacs/node-graceful-fs)\n- [Strips UTF-8 BOM](https://github.com/sindresorhus/strip-bom)\n- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)\n- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)\n\n\n## Install\n\n```\n$ npm install --save read-pkg\n```\n\n\n## Usage\n\n```js\nvar readPkg = require('read-pkg');\n\nreadPkg().then(function (pkg) {\n\tconsole.log(pkg);\n\t//=> {name: 'read-pkg', ...}\n});\n\nreadPkg(__dirname).then(function (pkg) {\n\tconsole.log(pkg);\n\t//=> {name: 'read-pkg', ...}\n});\n\nreadPkg(path.join('unicorn', 'package.json')).then(function (pkg) {\n\tconsole.log(pkg);\n\t//=> {name: 'read-pkg', ...}\n});\n```\n\n\n## API\n\n### readPkg([path], [options])\n\nReturns a promise that resolves to the parsed JSON.\n\n### readPkg.sync([path], [options])\n\nReturns the parsed JSON.\n\n#### path\n\nType: `string` \nDefault: `.`\n\nPath to a `package.json` file or its directory.\n\n#### options\n\n##### normalize\n\nType: `boolean` \nDefault: `true`\n\n[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.\n\n\n## Related\n\n- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file\n- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file\n- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n",
"readmeFilename": "readme.md",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/read-pkg.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "1.1.0"
}