next-chain-if

1.0.0 • Public • Published

next-chain-if

a plug in for invoke-next-chain

quickstart

$ npm i next-chain-if

test

$ cd next-chain-if
$ npm install
$ npm run test

example

let d = { a: 0 }
invokeNextChain(d)(
  nextChainIf(d => Promise.resolve(d.a % 1 === 0), async (d, next) => { ++d.a; await next() }),
  d => ++d.a
)
  .then(console.log(d)) // output { a: 2 }

Readme

Keywords

none

Package Sidebar

Install

npm i next-chain-if

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

8.75 kB

Total Files

7

Last publish

Collaborators

  • xiechao06