1.0.3 • Published 9 years ago
p-prom v1.0.3
p-prom
Inherits native Promise to create a new type. This type has the following differences/enhancements:
Spreadable.rejectmake sure the reason is an ErrorSpreadable.nodeconverts a node-style callback function into a promise returning oneSpreadable.allaccepts its parts as an array or arguments. (i.e. it flattens)Spreadable.seqaccepts a list of function that are each sequenced using.thenSpreadbale.node(function)converts/promisifies a node-style function to a promise creating versionSpreadable.defercreates a deferred with these properties:resolveresolves the deferredrejectrejects the deferredpromiseis the promise of the deferred
spreadable.spread(handler)calls the resolve handler with the solve value spread as arguments.spreadable.finally(handler)is a callshandler(reason, value)whether resolved or rejected