bide

0.2.1 • Public • Published

bide Coverage Status Build Status License: ISC

A linear a/sync values solver

const bode = bide({
  next(value) {
    if (value === 5)
      return new Promise(res => setTimeout(res, 50, 2));
    else
      console.log(value); // 1, 2, 3, 4
  },
  done(err) {
    if (err) throw err;
    console.log(bode.state); // resolved
  }
})
.by(
  1,
  5,  // will be replaced with the resolved value
  new Promise(res => setTimeout(res, 10, 3)),
  4
);

/bide/

    Package Sidebar

    Install

    npm i bide

    Weekly Downloads

    4

    Version

    0.2.1

    License

    ISC

    Unpacked Size

    9.78 kB

    Total Files

    7

    Last publish

    Collaborators

    • webreflection