|
4 年 前 | |
---|---|---|
.. | ||
index.d.ts | 4 年 前 | |
index.js | 4 年 前 | |
license | 4 年 前 | |
package.json | 4 年 前 | |
readme.md | 4 年 前 |
Read a package.json file
$ npm install read-pkg
const readPkg = require('read-pkg');
(async () => {
console.log(await readPkg());
//=> {name: 'read-pkg', …}
console.log(await readPkg({cwd: 'some-other-directory'});
//=> {name: 'unicorn', …}
})();
Returns a Promise<object>
with the parsed JSON.
Returns the parsed JSON.
Type: object
Type: string
Default: process.cwd()
Current working directory.
Type: boolean
Default: true
Normalize the package data.
package.json
fileMIT © Sindre Sorhus