Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 34d7d75

Browse files
committed
Accept arguments to process.nextTick(fn, ...args), just like Node.js's process.nextTick().
1 parent a868380 commit 34d7d75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mock/process.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
exports.nextTick = function nextTick(fn) {
2-
setTimeout(fn, 0);
2+
var args = Array.prototype.slice.call(arguments);
3+
args.shift();
4+
setTimeout(function () {
5+
fn.apply(null, args);
6+
}, 0);
37
};
48

59
exports.platform = exports.arch =

0 commit comments

Comments
 (0)