Package Exports
- 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 (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
package-json 
Get the package.json of a package from the npm registry
Install
$ npm install --save package-json
Usage
const packageJson = require('package-json');
packageJson('pageres', 'latest').then(json => {
console.log(json);
//=> {name: 'pageres', ...}
});
// also works with scoped packages
packageJson('@company/package', 'latest').then(json => {
console.log(json);
//=> {name: 'package', ...}
});
API
packageJson(name, [version])
You can optionally specify a version (e.g. 1.0.0
) or latest
.
If you don't specify a version you'll get the main entry containing all versions.
Related
- npm-keyword - Get a list of npm packages with a certain keyword
- npm-user - Get user info of a npm user
- npm-email - Get the email of a npm user
License
MIT © Sindre Sorhus