5.2.0 • Published 2 years ago

read-pkg v5.2.0

Weekly downloads
39,502,901
License
MIT
Repository
github
Last release
2 years ago

read-pkg Build Status

Read a package.json file

Why

Install

$ npm install read-pkg

Usage

const readPkg = require('read-pkg');

(async () => {
	console.log(await readPkg());
	//=> {name: 'read-pkg', …}

	console.log(await readPkg({cwd: 'some-other-directory'}));
	//=> {name: 'unicorn', …}
})();

API

readPkg(options?)

Returns a Promise<object> with the parsed JSON.

readPkg.sync(options?)

Returns the parsed JSON.

options

Type: object

cwd

Type: string Default: process.cwd()

Current working directory.

normalize

Type: boolean Default: true

Normalize the package data.

Related


read-pkg-upnpm-run-allconventional-changelog-coreconcurrently@vue/cli-shared-utilsreact-native-bluetooth2killi8n-react-native-fast-imagepipihomemio-cli-servicewandering-cli-servicern-send-smsmylicense@icanpm/api-master@findaway/sandbox@atome/cli@arisageha/react-lazyload@arisageha/react-lazyload-fix@jas99/huskyctm_connectorpg-cli-service@almeidaa/ms@igappstore/cli@guomio/cli-servicesimple-axios@ices/vue-cli-plugin-builderreact-native-template-rfbaseciic-sonarqube-scanner@xinke-core/ci-test-1airscanairscan-examplebb-chatclean-slate-lintreact-native-esc-pos-sahaabkuma-cli@borisovart/atol-kkt-moduleconstellate-plugin-webpack-node@frxf/frxf@backtrack/preset-presetlazy-bee-uirollup-plugin-generate-package-jsontransparent-commitizenanything-config-fiskerapc-youtube@semantic-release/apm@semantic-release/npm@scbd/dist-builder@smile-io/changelog-generator@smile-io/ember-styleguideapi-landscape@pwa/manifest-cli@ralley/cli@qiwi/uniconfig-plugin-pkg@qiwi/semantic-release-gh-pages-plugin@rbc-public/react-selectable-fast@rcag/cli-service@qiwi/license@revam/rollup-plugin-common@rps-engine/core@rxdi/boltdepsdenalidenali-clidependency-checkfreemambafhir2@wiptheia/plugin-package@weepower/clialfheimalfred-updateralfred-updatralfred-notifieralmighty-cli-shared-utilsgbmdigital-jest-slack-reportergive-me-fileflat-npm-dependencies@ynet-cli/core@xswap/token-listsflat-dependencies@xinke-core/cigh-remotegi-cligit-hash-packagealertpandajikkoinstalled-check-coreinit-koa2iolausis-package-depis-pkg-changedl2forlernalaya-ui-converterkuma-bootstraplaat-readme-jestjest-nunit-reporterjest-json-reporterjest-json-repoterjesusdemojest-xlsx-reporterjest-slack-integrationjest-slack-reporter
5.2.0

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.0.0

3 years ago

2.0.0

4 years ago

1.1.0

6 years ago

1.0.0

6 years ago