Socket
Socket
Sign inDemoInstall

queue-microtask

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.1 to 1.2.2

2

package.json
{
"name": "queue-microtask",
"description": "fast, tiny `queueMicrotask` shim for modern engines",
"version": "1.2.1",
"version": "1.2.2",
"author": {

@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh",

@@ -16,5 +16,5 @@ # queue-microtask [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]

- No dependencies. Less than 10 lines. No shims or complicated fallbacks.
- Optimal performance in all modern environments.
- Uses `queueMicrotask` in modern environments (optimal performance)
- Fallback to `Promise.resolve().then(fn)` in Node.js 10 and earlier, and old browsers (optimal performance)
- Optimal performance in all modern environments
- Uses `queueMicrotask` in modern environments
- Fallback to `Promise.resolve().then(fn)` in Node.js 10 and earlier, and old browsers (same performance as `queueMicrotask`)

@@ -51,2 +51,4 @@ ## install

If you just need to support Node 12 and later, use `queueMicrotask` directly. If you need to support all versions of Node, use this package.
## Why not use `process.nextTick`?

@@ -56,3 +58,3 @@

If you just need to support Node 12 and later, use `queueMicrotask` directly. If you need to support all versions of Node, use this package.
You can think of `queueMicrotask` as a standardized version of `process.nextTick` that works in the browser. No need to rely on your browser bundler to shim `process` for the browser environment.

@@ -59,0 +61,0 @@ ## Why not use `setTimeout(fn, 0)`?

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc