JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 122918
  • Score
    100M100P100Q157493F
  • License MIT

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

Package Exports

  • promise-deferred

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (promise-deferred) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#promise-deferred Version Badge

Build Status dependency status dev dependency status

npm badge

browser support

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