1.0.3 • Published 3 years ago

assic v1.0.3

Weekly downloads
15
License
-
Repository
github
Last release
3 years ago

assic

Parallel to serial module which like async to sync

Install

npm i assic

Usage

import { Assic } from 'assic';
const ass = new Assic();

function b1() {
  return new Promise(resolve => {
    setTImeout(() => {
      console.log('a1');
      resolve();
    }, 3000);
  })
}

function b2() {
  console.log('a2')
}

function a1() {
  ass.use(b1);
}

function a2() {
  ass.use(b2);
}

// run:

b1();
b2();

// output:
// a2
// a1

// run

a1();
a2();

// output:
// a1
// a2
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago