bleeding-edge
v1.1.0
Published
Node package version client
Downloads
27
Readme
bleeding-edge
Node package version client
Install
$ npm install --save bleeding-edge
Usage
import BleedingEdge from 'bleeding-edge';
const Client = BleedingEdge.get();
// Promise
Client
.latest('bleeding-edge')
.then(version => console.log(version)); // Returns latest version
// Callback
Client.latest(
'bleeding-edge',
(err, version) => console.log(version) // Returns latest version
);
// Use client with custom registry
const registry = 'http://nicholash.wang';
const Custom = BleedingEdge.get({ registry });
Custom.latest(...);
API
BleedingEdge
BleedingEdge -> class
Base class for BleedingEdge
BleedingEdge.get
BleedingEdge.get -> function -> BleedingEdge
Equivalent of new BleedingEdge
BleedingEdge#latest
BleedingEdge#latest(name: string, cb: ?function) -> function -> Promise
Returns the module's latest version. Can also pass a callback function.
BleedingEdge#wanted
BleedingEdge#wanted(name: string, cb: ?function) -> function -> Promise
Returns the module's wanted (bleeding edge) version. Can also pass a callback function.
License
MIT © Nicholas Hwang