promise-deferred
A lightweight Deferred implementation, on top of Promises/A+
Last updated 10 years ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install promise-deferred 
SYNC missed versions from official npm registry.

promise-deferred Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

A lightweight Deferred implementation, on top of Promises/A+

Examples

var Deferred = require('promise-deferred');

var deferred = new Deferred();

// set up handlers
deferred.promise.then(function (value) {}, function (error) {});

// resolve
deferred.resolve('a value');

// reject
deferred.reject(new Error('oh noes'));

Tests

Simply clone the repo, npm install, and run npm test

Current Tags

  • 2.0.4                                ...           latest (a year ago)

10 Versions

  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           5 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           10 years ago
  • 2.0.0                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.2.0                                ...           11 years ago
  • 0.1.1                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE