0.0.4 • Published 2 months ago

prom_tcr v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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

0.0.4

2 months ago

0.0.3

2 months ago