cnpm-api
v1.0.1
Published
get cnpm package info
Downloads
11
Readme
cnpm-api
get info from cnpm registry
Usage
install
yarn add cnpm-api
use
import Client from 'cnpm-api';
const cnpm = new Client();
const data = await cnpm.request('cnpm');
custom cnpm registry
const cnpm = new Client({ registry: 'http://rnpm.hz.netease.com' });
API
getPackage(packageName)
: get package infogetPackage(packageName, packageVersion)
: get package with specified versiongetPackageVersions(packageName)
: get package versions
Reference
- https://github.com/repo-utils/npm-request
- https://github.com/cnpm/cnpmjs.org/blob/master/docs/registry-api.md