Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

promise-deferred

ljharb473.7kMIT2.0.4TypeScript support: definitely-typed

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

promise, promises, deferred, deferreds, reject, resolve, async

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v2.0.4 - 2023-09-06

Commits

  • [meta] update .gitignore 5fe39be
  • [actions] add reusable workflows b489c11
  • [Dev Deps] update eslint, @ljharb/eslint-config, auto-changelog, safe-publish-latest, tape c9ad5ca
  • [Dev Deps] switch from covert to nyc 7a4d62c
  • [actions] update rebase action b5bb367
  • [meta] create FUNDING.yml 7e4873f
  • [meta] use npmignore to autogenerate an npmignore file ac3a16d
  • [Dev Deps] update @ljharb/eslint-config, tape; add safe-publish-latest b7f7d23
  • [Dev Deps] update @ljharb/eslint-config, aud, tape a30fb1a
  • [Dev Deps] update auto-changelog, tape 026083b
  • [Tests] only audit prod deps 0b101b6
  • [Deps] update promise 05422e6
  • [Dev Deps] update auto-changelog 4bc237c
  • [Deps] update promise 3ec9fd6
  • [Deps] update promise - turns out it was 729483b causing the break c8226e5

v2.0.3 - 2020-01-14

Commits

  • [Deps] downgrade promise, as upgrading it was a breaking change b50f4a8

v2.0.2 - 2020-01-14

Commits

  • Update tape, eslint, jscs; add my personal shared eslint config 7ca9c8d
  • Add npm run eslint 97e6e47
  • [Dev Deps] remove jscs d263787
  • [Tests] use shared travis-ci configs 5b01bbd
  • [Tests] up to node v8.1; v7.10; v6.11; v5.12, v4.8; io.js v3.3; improve test matrix; npm 4.6+ breaks on node < 1; npm 5+ breaks on node < 4. be6ffa0
  • [meta] add auto-changelog 8df5df8
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config, nsp, tape 333ba8c
  • Update tape, covert, jscs 1f2a186
  • Update eslint b1e9015
  • Test up to io.js v2.3 4af8785
  • [actions] add automatic rebasing / merge commit blocking 000672a
  • [Dev Deps] update tape, jscs, eslint c91fd12
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape, covert f82414c
  • [Dev Deps] update eslint, @ljharb/eslint-config, nsp, tape 4e1dc22
  • Only apps should have lockfiles. 6a2d7a1
  • Add npm run security 427afe6
  • All grade A-supported node/iojs versions now ship with an npm that understands ^. 5b51d5a
  • Run travis-ci tests on iojs and node v0.12; speed up builds; allow 0.8 failures. a73ba53
  • [readme] remove testling a3e7517
  • [Tests] use npx aud instead of nsp or npm audit with hoops 5ad1266
  • Update promise, tape abb7d6c
  • Test up to io.js v2.5 57f75ad
  • Update tape, jscs cf8057c
  • [Deps] update promise 80c0d66
  • [meta] add funding field f075ee6
  • docs(readme): correct markdown fe0903a
  • [Dev Deps] update tape 1035c0d
  • Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. 76e4ad5
  • Use just the bare es6 promise implementation in promise. 729483b
  • Update promise 66ab6b5
  • [Deps] remove mistakenly added dep 148ec27
  • Test on io.js v3.0 e0fd61d

v2.0.1 - 2015-01-19

Commits

v2.0.0 - 2014-09-13

Commits

  • Adding license and downloads badges 7c245b8
  • Updating to v2.0.0 due to a major version bump in "promise" 788785e
  • Updating promise 6d3e940
  • Updating jscs 643a8ea
  • Updating jscs 696d58f

v1.0.1 - 2014-08-27

Commits

  • Adding npm run lint c3f9047
  • USe SVG badges instead of PNG 44291fb
  • Adding a test for Deferred.Promise 19bfe33
  • Make the entire module be in strict mode 8e460da
  • Run linter as part of tests. 6304611
  • Run code coverage checks during tests 318dd2e
  • Updating covert 035328c

v1.0.0 - 2014-08-10

Commits

v0.2.0 - 2014-04-29

Commits

v0.1.1 - 2014-03-16

Commits

  • Updating dependencies 67f85fc
  • Adding more Travis coverage d16e1d8
  • Declare explicit support for node 0.8 and up d747193
  • Testing on node 0.6 again ba98eda
  • Updating covert 98e3be8
  • Don't test in unstable node just yett 89f55ed

v0.1.0 - 2013-12-30

Commits