From 67e76ea150f30561e9ce7624459031197c45a68a Mon Sep 17 00:00:00 2001 From: Alexander Early Date: Mon, 3 Apr 2017 01:17:11 -0700 Subject: remove rest completely --- lib/internal/setImmediate.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/internal/setImmediate.js') 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; -- cgit v1.2.1