Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « process-nextick-args « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 049521cad7ba1bd5de4457ebaa2f781fe0180cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
'use strict';
module.exports = nextTick;

function nextTick(fn) {
  var args = new Array(arguments.length - 1);
  var i = 0;
  while (i < args.length) {
    args[i++] = arguments[i];
  }
  process.nextTick(function afterTick() {
    fn.apply(null, args);
  });
}