Skip to content

kesla/get-package-json-from-registry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-package-json-from-registry

Get a package.json from the registry, cached.

module

npm install [--save] get-package-json-from-registry
import getPackageJson from 'get-package-json-from-registry';

// these 2 will result in one query to the registry since we have a cache
getPackageJson('snappy@2').then(json => console.log(json));
getPackageJson('snappy@~1.1.0').then(json => console.log(json));

// calls will be cached in this instance
const getPackageJsonCached = getPackageJson.cached();

// these 2 will result in one query to the registry since we have a cache
getPackageJsonCached('snappy@2').then(json => console.log(json));
getPackageJsonCached('snappy@~1.1.0').then(json => console.log(json));

cli

npm -g install get-package-json-from-registry

get-package-json-from-registry snappy@2
get-package-json-from-registry snappy@~1.1.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published