summaryrefslogtreecommitdiff
path: root/lib/internal/setImmediate.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/setImmediate.js')
-rw-r--r--lib/internal/setImmediate.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/internal/setImmediate.js b/lib/internal/setImmediate.js
index c8824c7..95191f9 100644
--- a/lib/internal/setImmediate.js
+++ b/lib/internal/setImmediate.js
@@ -1,6 +1,6 @@
'use strict';
-import rest from './rest';
+import slice from './slice';
export var hasSetImmediate = typeof setImmediate === 'function' && setImmediate;
export var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function';
@@ -10,11 +10,12 @@ export function fallback(fn) {
}
export function wrap(defer) {
- return rest(function (fn, args) {
+ return function (fn/*, ...args*/) {
+ var args = slice(arguments, 1);
defer(function () {
fn.apply(null, args);
});
- });
+ };
}
var _defer;