Template Upload
This commit is contained in:
12
node_modules/process-nextick-args/.travis.yml
generated
vendored
Normal file
12
node_modules/process-nextick-args/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.8"
|
||||
- "0.10"
|
||||
- "0.11"
|
||||
- "0.12"
|
||||
- "1.7.1"
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
43
node_modules/process-nextick-args/index.js
generated
vendored
Normal file
43
node_modules/process-nextick-args/index.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
if (!process.version ||
|
||||
process.version.indexOf('v0.') === 0 ||
|
||||
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
|
||||
module.exports = nextTick;
|
||||
} else {
|
||||
module.exports = process.nextTick;
|
||||
}
|
||||
|
||||
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);
|
||||
});
|
||||
}
|
||||
}
|
19
node_modules/process-nextick-args/license.md
generated
vendored
Normal file
19
node_modules/process-nextick-args/license.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2015 Calvin Metcalf
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.**
|
74
node_modules/process-nextick-args/package.json
generated
vendored
Normal file
74
node_modules/process-nextick-args/package.json
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"process-nextick-args@~1.0.6",
|
||||
"C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\readable-stream"
|
||||
]
|
||||
],
|
||||
"_from": "process-nextick-args@>=1.0.6-0 <1.1.0-0",
|
||||
"_id": "process-nextick-args@1.0.7",
|
||||
"_inCache": true,
|
||||
"_location": "/process-nextick-args",
|
||||
"_nodeVersion": "5.11.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "calvin.metcalf@gmail.com",
|
||||
"name": "cwmma"
|
||||
},
|
||||
"_npmVersion": "3.8.6",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "process-nextick-args",
|
||||
"raw": "process-nextick-args@~1.0.6",
|
||||
"rawSpec": "~1.0.6",
|
||||
"scope": null,
|
||||
"spec": ">=1.0.6-0 <1.1.0-0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/readable-stream"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
||||
"_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "process-nextick-args@~1.0.6",
|
||||
"_where": "C:\\Users\\x2mjbyrn\\Source\\Repos\\Skeleton\\node_modules\\readable-stream",
|
||||
"author": "",
|
||||
"bugs": {
|
||||
"url": "https://github.com/calvinmetcalf/process-nextick-args/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "process.nextTick but always with args",
|
||||
"devDependencies": {
|
||||
"tap": "~0.2.6"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
|
||||
"tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
|
||||
},
|
||||
"gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39",
|
||||
"homepage": "https://github.com/calvinmetcalf/process-nextick-args",
|
||||
"installable": true,
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "cwmma",
|
||||
"email": "calvin.metcalf@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "process-nextick-args",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/calvinmetcalf/process-nextick-args.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.7"
|
||||
}
|
18
node_modules/process-nextick-args/readme.md
generated
vendored
Normal file
18
node_modules/process-nextick-args/readme.md
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
process-nextick-args
|
||||
=====
|
||||
|
||||
[](https://travis-ci.org/calvinmetcalf/process-nextick-args)
|
||||
|
||||
```bash
|
||||
npm install --save process-nextick-args
|
||||
```
|
||||
|
||||
Always be able to pass arguments to process.nextTick, no matter the platform
|
||||
|
||||
```js
|
||||
var nextTick = require('process-nextick-args');
|
||||
|
||||
nextTick(function (a, b, c) {
|
||||
console.log(a, b, c);
|
||||
}, 'step', 3, 'profit');
|
||||
```
|
24
node_modules/process-nextick-args/test.js
generated
vendored
Normal file
24
node_modules/process-nextick-args/test.js
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
var test = require("tap").test;
|
||||
var nextTick = require('./');
|
||||
|
||||
test('should work', function (t) {
|
||||
t.plan(5);
|
||||
nextTick(function (a) {
|
||||
t.ok(a);
|
||||
nextTick(function (thing) {
|
||||
t.equals(thing, 7);
|
||||
}, 7);
|
||||
}, true);
|
||||
nextTick(function (a, b, c) {
|
||||
t.equals(a, 'step');
|
||||
t.equals(b, 3);
|
||||
t.equals(c, 'profit');
|
||||
}, 'step', 3, 'profit');
|
||||
});
|
||||
|
||||
test('correct number of arguments', function (t) {
|
||||
t.plan(1);
|
||||
nextTick(function () {
|
||||
t.equals(2, arguments.length, 'correct number');
|
||||
}, 1, 2);
|
||||
});
|
Reference in New Issue
Block a user