/RegistryPkgInfo

get package info from remote registry

Primary LanguageJavaScript

RegistryPkgInfo

GitHub issues GitHub forks GitHub stars GitHub license

Install

npm install registry-package-info

Demo

const getRegistryPkgInfo = require('registry-package-info');

/* get the latest version package info from npm registry */

getRegistryPkgInfo('react',{
	registry:'http://registry.npmjs.org',
	version:'latest'
})
.then(function(data){
	console.dir(data);
})
.catch(function(e){
	console.log(e);
})
	

Parameters

getRegistryPkgInfo ( pkgname, options );

parameter description default required
pkgname string null Y
options object { version:'latest', registry:'http://registry.npmjs.org' } N

License

registry-pkg-info is MIT licensed.