๐Ÿ“ฆ aleclarson / flush-microtasks

Know when the microtask queue is empty

โ˜… 2 stars โ‘‚ 0 forks ๐Ÿ‘ 2 watching
microtaskstesting
๐Ÿ“ฅ Clone https://github.com/aleclarson/flush-microtasks.git
HTTPS git clone https://github.com/aleclarson/flush-microtasks.git
SSH git clone git@github.com:aleclarson/flush-microtasks.git
CLI gh repo clone aleclarson/flush-microtasks
Alec Larson Alec Larson 1.0.1 d565701 6 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ src
๐Ÿ“„ .gitignore
๐Ÿ“„ package.json
๐Ÿ“„ pnpm-lock.yaml
๐Ÿ“„ README.md
๐Ÿ“„ tsconfig.json
๐Ÿ“„ README.md

flush-microtasks

Return a thenable that resolves when the microtask queue is empty.

Taken from enqueueTask.js in React.

import { flushMicroTasks } from 'flush-microtasks'

await flushMicroTasks()