Skip to content

notjrbauer/promise.pipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published