chore: add pkg dependencies
This commit is contained in:
45
node_modules/process-nextick-args/index.js
generated
vendored
Normal file
45
node_modules/process-nextick-args/index.js
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
'use strict';
|
||||
|
||||
if (typeof process === 'undefined' ||
|
||||
!process.version ||
|
||||
process.version.indexOf('v0.') === 0 ||
|
||||
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
|
||||
module.exports = { nextTick: nextTick };
|
||||
} else {
|
||||
module.exports = process
|
||||
}
|
||||
|
||||
function nextTick(fn, arg1, arg2, arg3) {
|
||||
if (typeof fn !== 'function') {
|
||||
throw new TypeError('"callback" argument must be a function');
|
||||
}
|
||||
var len = arguments.length;
|
||||
var args, i;
|
||||
switch (len) {
|
||||
case 0:
|
||||
case 1:
|
||||
return process.nextTick(fn);
|
||||
case 2:
|
||||
return process.nextTick(function afterTickOne() {
|
||||
fn.call(null, arg1);
|
||||
});
|
||||
case 3:
|
||||
return process.nextTick(function afterTickTwo() {
|
||||
fn.call(null, arg1, arg2);
|
||||
});
|
||||
case 4:
|
||||
return process.nextTick(function afterTickThree() {
|
||||
fn.call(null, arg1, arg2, arg3);
|
||||
});
|
||||
default:
|
||||
args = new Array(len - 1);
|
||||
i = 0;
|
||||
while (i < args.length) {
|
||||
args[i++] = arguments[i];
|
||||
}
|
||||
return process.nextTick(function afterTick() {
|
||||
fn.apply(null, args);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
25
node_modules/process-nextick-args/package.json
generated
vendored
Normal file
25
node_modules/process-nextick-args/package.json
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "process-nextick-args",
|
||||
"version": "2.0.1",
|
||||
"description": "process.nextTick but always with args",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/calvinmetcalf/process-nextick-args.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
|
||||
},
|
||||
"homepage": "https://github.com/calvinmetcalf/process-nextick-args",
|
||||
"devDependencies": {
|
||||
"tap": "~0.2.6"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user