1.1.0 • Published 8 years ago

bleeding-edge v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

bleeding-edge

Node package version client

npm version build status

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