From 8422bb37b093f18dc0de1dc16bf91f8f5b25b98a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 19 May 2016 08:28:49 -0700 Subject: [PATCH] Group `clearTimeout` and `setTimeout`. --- lodash.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index 3591d56ba..7dae9e29c 100644 --- a/lodash.js +++ b/lodash.js @@ -1288,15 +1288,17 @@ Reflect = context.Reflect, Symbol = context.Symbol, Uint8Array = context.Uint8Array, - clearTimeout = function(id) { return context.clearTimeout.call(root, id); }, enumerate = Reflect ? Reflect.enumerate : undefined, getOwnPropertySymbols = Object.getOwnPropertySymbols, iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined, objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, - setTimeout = function(func, wait) { return context.setTimeout.call(root, func, wait); }, splice = arrayProto.splice; + /** Built-in method references that are mockable. */ + var clearTimeout = function(id) { return context.clearTimeout.call(root, id); }, + setTimeout = function(func, wait) { return context.setTimeout.call(root, func, wait); }; + /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeFloor = Math.floor,