JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 35056
  • Score
    100M100P100Q140006F
  • License MIT

Read package.json files.

Package Exports

  • r-package-json

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (r-package-json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

r-package-json PayPal Version Downloads Get help on Codementor

Read package.json files.

Installation

$ npm i --save r-package-json

Example

const readPack = require("r-package-json");

readPack(__dirname + "/..", function (err, pack) {
    console.log(err || pack);
    // { name: 'w-package-json',
    //   version: '1.0.0',
    //   description: 'Write package.json files.',
    //   main: 'index.js',
    //   ...
    // }
});

Documentation

readPackageJson(dir, callback)

Reads the package.json content from the provided directory.

Params

  • String dir: The path to the directory containing the package.json file.
  • Function callback: The callback function.

Return

  • Object The package.json content (if a callback function was not provided).

How to contribute

Have an idea? Found a bug? See how to contribute.

Where is this library used?

If you are using this library in one of your projects, add it in this list. ✨

License

MIT © Ionică Bizău