package
Extract project identity from pakage json file.
npm install pkg-to-idGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Extract project identity from a package json file.
Use name as project name, then goes though
pkg.repository.url, pkg.author,
pkg.bugs.url, pkg.homepage
Until it find a value for project author.
Run the following commands to download and install the application:
$ npm i pkg-to-id --save
var pgkToId = require('pkg-to-id ');
var identity = pkgToId(require('package.json'));
console.log(identity);
// would print
// {
// user: 'maboiteaspam',
// name: 'pkg-to-id'
// }
your-great-feature.