This package has been deprecated

Author message:

unsupported / joke / demo

p-prom

1.0.3 • Public • Published

p-prom

Inherits native Promise to create a new type. This type has the following differences/enhancements:

  • Spreadable.reject make sure the reason is an Error
  • Spreadable.node converts a node-style callback function into a promise returning one
  • Spreadable.all accepts its parts as an array or arguments. (i.e. it flattens)
  • Spreadable.seq accepts a list of function that are each sequenced using .then
  • Spreadbale.node(function) converts/promisifies a node-style function to a promise creating version
  • Spreadable.defer creates a deferred with these properties:
    • resolve resolves the deferred
    • reject rejects the deferred
    • promise is the promise of the deferred
  • spreadable.spread(handler) calls the resolve handler with the solve value spread as arguments.
  • spreadable.finally(handler) is a calls handler(reason, value) whether resolved or rejected

Dependents (6)

Package Sidebar

Install

npm i p-prom

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • pipobscure