New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

p-prom

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-prom

Enhancement-Monkey-Patch for native Promises

latest
Source
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

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

Keywords

Promise

FAQs

Package last updated on 07 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts