🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

queue-microtask

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queue-microtask

fast, tiny `queueMicrotask` shim for modern engines

1.2.3
latest
Version published
Weekly downloads
50M
9.84%
Maintainers
1
Weekly downloads
 
Created

What is queue-microtask?

The queue-microtask npm package provides a way to queue tasks to run after the current JavaScript event loop tick, but before rendering or IO. This is useful for deferring less critical work until after more important tasks have completed without causing significant delays.

What are queue-microtask's main functionalities?

Deferring execution

This feature allows you to defer the execution of a function until after the current event loop tick has completed, but before the browser's rendering process begins. It's useful for optimizing performance by ensuring that critical tasks are not delayed by less critical ones.

queueMicrotask(() => {
  console.log('This runs after the current event loop tick but before rendering.');
});
0

FAQs

Package last updated on 22 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts