node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org ยป

p-promise

Build Status

Promises/A+ logo

P

A simple Promises/A+ library.

API

P implements a subset of the Q API.

  • P(val)
  • P.reject(reason)
  • P.defer()
  • P.all(promises)
  • P.allSettled(promises)
  • P.spread(promises, onFulfilled, onRejected) ๐Ÿ†•
  • P.promised(aFunction)
  • P.denodeify(aFunction) ๐Ÿ†•
  • P.onerror
  • P.longStackSupport ๐Ÿ†•
  • P.nextTick(callback)
  • deferred.promise
  • deferred.resolve(value)
  • deferred.reject(reason)
  • promise.then(onFulfilled, onRejected)
  • promise.done(onFulfilled, onRejected)
  • promise.fin(callback) ๐Ÿ†•
  • promise.spread(onFulfilled, onRejected)
  • promise.all()
  • promise.allSettled()
  • promise.timeout(ms, opt_timeoutMsg)
  • promise.delay(ms)
  • promise.inspect()
  • promise.nodeify(nodeback) ๐Ÿ†•