prom

Simple promises.

Stats

StarsIssuesVersionUpdatedCreatedSize
prom
100.0.38 years ago9 years agoMinified + gzip package size for prom in KB

Readme

prom, simple node.js promises

Calls functions once a promise has been delivered.

var prom = require('prom');

var onready = prom();
onready(console.log.bind(console, 'one'));
onready(console.log.bind(console, 'two'));

// Deliver the promise
onready.deliver('delivered-arg-1', 'delivered-arg-2').
// > one delivered-arg-1 delivered-arg-2
// > two delivered-arg-1 delivered-arg-2

// Once the promise has been delivered, the callback on next event loop.
onready(console.log.bind(console, 'three'))
// > three delivered-arg-1 delivered-arg-2

License

MIT

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.