promise.pipe

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

MIT 3 个版本
安装
npm install promise.pipe
yarn add promise.pipe
pnpm add promise.pipe
bun add promise.pipe
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

版本列表
3.0.0 2016-01-25
1.0.2 2016-01-25
1.0.1 2016-01-25