This package has been deprecated

Author message:

this package has been deprecated

next-tick-2

1.1.1 • Public • Published

DEPRECATED

Avoid using next-tick-2 or next-tick. setTimeout(...) is a better alternative, and it's available everywhere.

next-tick-2

Environment agnostic nextTick polyfill

Build Status

A commonjs module that provides nextTick functionality in node and the browser.

  • When run in Node.js process.nextTick is used
  • In modern browsers microtask resolution is guaranteed by MutationObserver
  • In other engines setImmediate or setTimeout(fn, 0) is used as fallback.
  • If none of the above is supported module resolves to undefined

why next-tick-2?

The original next-tick module includes the node process module, which causes browserify to shim the module. It results in a larger bundle size, with unused code.

The original maintainer is not interested in fixing the problem. As a result the browserified code that relies on next-tick-2 is significantly (3.4X) smaller than that generated by next-tick:

-rw-r--r--  1 mike  staff  8022 May  2 11:18 bundle-next-tick.js
-rw-r--r--  1 mike  staff  2334 May  2 11:18 bundle-next-tick-2.js

Package Sidebar

Install

npm i next-tick-2

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

7.35 kB

Total Files

7

Last publish

Collaborators

  • mreinstein