Gathering detailed insights and metrics for npm-registry-package-info
Gathering detailed insights and metrics for npm-registry-package-info
Gathering detailed insights and metrics for npm-registry-package-info
Gathering detailed insights and metrics for npm-registry-package-info
Get package details for one or more packages.
npm install npm-registry-package-info
Typescript
Module System
Node Version
NPM Version
63.8
Supply Chain
90.9
Quality
69.8
Maintenance
50
Vulnerability
99.6
License
JavaScript (92.91%)
Makefile (7.09%)
Total Downloads
45,159
Last Day
106
Last Week
124
Last Month
233
Last Year
3,760
MIT License
4 Stars
16 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Jul 08, 2019
Minified
Minified + Gzipped
Latest Version
1.0.5
Package Id
npm-registry-package-info@1.0.5
Size
7.38 kB
NPM Version
2.14.7
Node Version
4.2.3
Cumulative downloads
Total Downloads
Last Day
1,666.7%
106
Compared to previous day
Last Week
396%
124
Compared to previous week
Last Month
21.4%
233
Compared to previous month
Last Year
-14.5%
3,760
Compared to previous year
11
Get package information for one or more packages.
1$ npm install npm-registry-package-info
1var pkginfo = require( 'npm-registry-package-info' );
Get package information for one or more packages.
1var opts = { 2 'packages': [ 3 'dstructs-matrix', 4 'compute-erf', 5 'utils-copy', 6 'unknown_package_name' 7 ] 8}; 9 10pkginfo( opts, clbk ); 11 12function clbk( error, data ) { 13 if ( error ) { 14 throw error; 15 } 16 console.dir( data ); 17 /* 18 { 19 "meta": { 20 "total": 4, 21 "success": 3, 22 "failure": 1 23 }, 24 "data": { 25 "dstructs-matrix": {...}, 26 "compute-erf": {...}, 27 "utils-copy": {...} 28 }, 29 "failures": { 30 "unknown_package_name": "Not Found" 31 } 32 } 33 */ 34}
The function
accepts the following options
:
array
of package names (required).'registry.npmjs.org'
.443
(HTTPS) or 80
(HTTP).'https'
.boolean
indicating whether to return only the latest package information from a registry.To query an alternative registry, set the relevant options.
1var opts = { 2 'packages': [ 3 'dstructs-array', 4 'flow-map', 5 'utils-merge2' 6 ], 7 'registry': 'my.favorite.npm/registry', 8 'port': 80, 9 'latest': true, 10 'protocol': 'http' 11}; 12 13pkginfo( opts, clbk );
Creates a reusable function
.
1var pkgs = [ 2 'dstructs-matrix', 3 'compute-stdev', 4 'compute-variance' 5]; 6 7var get = pkginfo.factory( {'packages': pkgs}, clbk ); 8 9get(); 10get(); 11get(); 12// ...
The factory method accepts the same options
as pkginfo()
.
error
(e.g., no network connection, non-existent registry, etc), that error
is returned immediately to the provided callback
.error
(e.g., timeout, reset connection, etc), that error
is included in the returned results under the failures
field.1var ls = require( 'npm-list-author-packages' ); 2var pkginfo = require( 'npm-registry-package-info' ); 3 4var opts = { 5 'username': 'kgryte' 6}; 7 8ls( opts, onList ); 9 10function onList( error, list ) { 11 var opts; 12 if ( error ) { 13 throw error; 14 } 15 if ( !list.length ) { 16 return; 17 } 18 opts = { 19 'packages': list 20 }; 21 pkginfo( opts, onInfo ); 22} 23 24function onInfo( error, data ) { 25 if ( error ) { 26 throw error; 27 } 28 console.dir( data ); 29}
To run the example code from the top-level application directory,
1$ DEBUG=* node ./examples/index.js
To use the module as a general utility, install the module globally
1$ npm install -g npm-registry-package-info
1Usage: pkginfo [options] pkg1 pkg2 ... 2 3Options: 4 5 -h, --help Print this message. 6 -V, --version Print the package version. 7 -p, --port port Registry port. Default: 443 (HTTPS) or 80 (HTTP). 8 --registry registry Registry. Default: 'registry.npmjs.org'. 9 --protocol protocol Registry protocol. Default: 'https'. 10 --latest Only return the latest package entry.
stdout
.error
(failure), the package (and its associated error
) is written to sterr
.1$ DEBUG=* pkginfo dstructs-matrix compute-erf utils-copy 2# => {...}
This repository uses tape for unit tests. To run the tests, execute the following command in the top-level application directory:
1$ make test
All new feature development should have corresponding unit tests to validate correct functionality.
This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
1$ make test-cov
Istanbul creates a ./reports/coverage
directory. To access an HTML version of the report,
1$ make view-cov
This repository uses Testling for browser testing. To run the tests in a (headless) local web browser, execute the following command in the top-level application directory:
1$ make test-browsers
To view the tests in a local web browser,
1$ make view-browser-tests
Copyright © 2016. Athan Reines.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/16 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More@types/npm-registry-package-info
TypeScript definitions for npm-registry-package-info
package-fetcher
Get information about an NPM package directly from the registry.
@extra-npm/view
View registry info about a package.
npm-stats-info
This is an npm package to interact with the npm api and npm registry. You can search for npm packages, get details, statistics or downlaod counts of any npm package.