diff options
Diffstat (limited to 'lib/internal/setImmediate.js')
-rw-r--r-- | lib/internal/setImmediate.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/internal/setImmediate.js b/lib/internal/setImmediate.js index 95191f9..e14e52e 100644 --- a/lib/internal/setImmediate.js +++ b/lib/internal/setImmediate.js @@ -1,7 +1,5 @@ 'use strict'; -import slice from './slice'; - export var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; export var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; @@ -10,12 +8,7 @@ export function fallback(fn) { } export function wrap(defer) { - return function (fn/*, ...args*/) { - var args = slice(arguments, 1); - defer(function () { - fn.apply(null, args); - }); - }; + return (fn, ...args) => defer(() => fn(...args)); } var _defer; |