diff -Nru node-process-nextick-args-1.0.6/debian/changelog node-process-nextick-args-1.0.8/debian/changelog --- node-process-nextick-args-1.0.6/debian/changelog 2015-12-23 13:34:59.000000000 +0000 +++ node-process-nextick-args-1.0.8/debian/changelog 2016-06-11 13:42:03.000000000 +0000 @@ -1,3 +1,11 @@ +node-process-nextick-args (1.0.8-1) unstable; urgency=medium + + * New upstream release + * Use secure URIs + * Bump standards version, no changes required + + -- Ross Gammon Sat, 11 Jun 2016 15:41:18 +0200 + node-process-nextick-args (1.0.6-1) unstable; urgency=medium * New upstream release diff -Nru node-process-nextick-args-1.0.6/debian/control node-process-nextick-args-1.0.8/debian/control --- node-process-nextick-args-1.0.6/debian/control 2015-12-23 13:34:59.000000000 +0000 +++ node-process-nextick-args-1.0.8/debian/control 2016-06-11 13:42:03.000000000 +0000 @@ -7,10 +7,10 @@ dh-buildinfo, nodejs, node-tap -Standards-Version: 3.9.6 +Standards-Version: 3.9.8 Homepage: https://github.com/calvinmetcalf/process-nextick-args -Vcs-Git: git://anonscm.debian.org/pkg-javascript/node-process-nextick-args.git -Vcs-Browser: http://anonscm.debian.org/cgit/pkg-javascript/node-process-nextick-args.git +Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-process-nextick-args.git +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-javascript/node-process-nextick-args.git Package: node-process-nextick-args Architecture: all diff -Nru node-process-nextick-args-1.0.6/index.js node-process-nextick-args-1.0.8/index.js --- node-process-nextick-args-1.0.6/index.js 2015-12-03 01:12:06.000000000 +0000 +++ node-process-nextick-args-1.0.8/index.js 2016-05-04 20:54:40.000000000 +0000 @@ -8,13 +8,36 @@ module.exports = process.nextTick; } -function nextTick(fn) { - var args = new Array(arguments.length - 1); - var i = 0; - while (i < args.length) { - args[i++] = arguments[i]; +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); + }); } - process.nextTick(function afterTick() { - fn.apply(null, args); - }); } diff -Nru node-process-nextick-args-1.0.6/package.json node-process-nextick-args-1.0.8/package.json --- node-process-nextick-args-1.0.6/package.json 2015-12-03 01:12:06.000000000 +0000 +++ node-process-nextick-args-1.0.8/package.json 2016-05-04 20:54:40.000000000 +0000 @@ -1,8 +1,11 @@ { "name": "process-nextick-args", - "version": "1.0.6", + "version": "1.0.8", "description": "process.nextTick but always with args", "main": "index.js", + "files": [ + "index.js" + ], "scripts": { "test": "node test.js" },