Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cevio/assic
Parallel to serial module which like async to sync
https://github.com/cevio/assic
Last synced: 4 days ago
JSON representation
Parallel to serial module which like async to sync
- Host: GitHub
- URL: https://github.com/cevio/assic
- Owner: cevio
- Created: 2020-12-11T06:39:52.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-15T10:15:46.000Z (almost 4 years ago)
- Last Synced: 2024-10-12T22:51:51.422Z (about 1 month ago)
- Language: TypeScript
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `assic`
Parallel to serial module which like async to sync
## Install
```bash
npm i assic
```## Usage
```ts
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
```