root 3bf41bf355 update | vor 1 Jahr | |
---|---|---|
.. | ||
node_modules | vor 1 Jahr | |
index.d.ts | vor 1 Jahr | |
index.js | vor 1 Jahr | |
license | vor 1 Jahr | |
package.json | vor 1 Jahr | |
readme.md | vor 1 Jahr |
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
file