Socket
Socket
Sign inDemoInstall

process.nexttick

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    process.nexttick

nextTick polyfill for early Node versions.


Version published
Weekly downloads
23
increased by360%
Maintainers
1
Install size
24.0 kB
Created
Weekly downloads
 

Readme

Source

view on npm downloads per month node version build status test coverage license

In Node version <1 process.nextTick() accepts a callback function only. In later versions you can supply additional arguments to pass when invoking the callback. This is a polyfill for early versions.

Usage


// In Node >=1 the built-in `nextTick()` method is exposed, 
// so this is just a re-assignment that has no effect.
process.nextTick = require('process.nexttick')

// Now you can safely pass additional arguments 
// to `nextTick()` regardless of Node version.
process.nextTick(function (arg) {
    arg === 42 // true
}, 42)

Note: This module itself does not overwrite process.nextTick().

Installation

With npm:

npm install process.nexttick

License

MIT

Keywords

FAQs

Last updated on 08 Aug 2016

Did you know?

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

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