JSPM

promise.pipe

3.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1747
  • Score
    100M100P100Q109716F
  • License MIT

Performs left to right composition of one or more functions whom return promises

Package Exports

  • promise.pipe

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (promise.pipe) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

promise-pipe

"Performs left to right composition of one or more functions that returns a promise"

NPM

Install

$ npm install promise.pipe --save

Usage

var pipe = require('promise.pipe')
var addThree = pipe(addOne, addOne, addOne)

addThree(0)
  .then(console.log) // 3
  .catch(console.error)

API

pipe(callbacks..., or Array<callbacks>) -> promise

Runs multiple promise-returning functions in a series, passing each result to the next defined promise-returning function.

functions

Required Type: function -> Promise