p
p copied to clipboard
Simple Promise/A+ Library

#P
A simple Promises/A+ library.
- Implements a subset of the Q API.
- Passing the Promises/A+ Compliance Test Suite.
- Cross-Browser, Node.js and RequireJS ready.
- Supports domains.
- Small.
- Simple.
- Fast.
##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)
:new: -
P.promised(aFunction)
-
P.denodeify(aFunction)
:new: -
P.onerror
-
P.longStackSupport
:new: -
P.nextTick(callback)
-
deferred.promise
-
deferred.resolve(value)
-
deferred.reject(reason)
-
promise.then(onFulfilled, onRejected)
-
promise.done(onFulfilled, onRejected)
-
promise.fin(callback)
:new: -
promise.spread(onFulfilled, onRejected)
-
promise.all()
-
promise.allSettled()
-
promise.timeout(ms, opt_timeoutMsg)
-
promise.delay(ms)
-
promise.inspect()
-
promise.nodeify(nodeback)
:new: