Bakhtina Sofya b84cb877be 1st comm | 3 долоо хоног өмнө | |
---|---|---|
.. | ||
node_modules | 3 долоо хоног өмнө | |
index.d.ts | 3 долоо хоног өмнө | |
index.js | 3 долоо хоног өмнө | |
license | 3 долоо хоног өмнө | |
package.json | 3 долоо хоног өмнө | |
readme.md | 3 долоо хоног өмнө |
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