@v4fire/core
Version:
V4Fire core library
21 lines (14 loc) • 335 B
Markdown
# core/async
This module provides a class to control asynchronous operations.
```js
import Async from 'core/async';
const
watcher = new Async();
watcher.setTimeout(() => {
console.log(1);
}, 100, {group: 'foo'});
watcher.setTimeout(() => {
console.log(2);
}, 200, {group: 'foo'});
watcher.clearTimeout({group: 'foo'});
```