promisesaplus

1.0.1 • Public • Published

promise.js

A Minimal, fully Promises/A+ compliant library.

Promises/A+ spec here: http://promisesaplus.com/

Usage

  • promise() - Created a promise. Can pass an optional obj argument. If passed, promise methods are attached to passed object.

Promise Methods

  • then(onFulfill, onReject) - bind fulfillment/rejection handlers to the promise. Returns a promise object
  • fulfill(value) - fulfills the promise with the passed value.
  • reject(reason) - rejects the promise with the passed reason.

For all behaviors, see the spec.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    1
  • 1.0.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i promisesaplus

Weekly Downloads

1

Version

1.0.1

License

BSD

Last publish

Collaborators

  • potch