From 03254a0c0f593e9e96d708589368e2c069ab019c Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Thu, 21 Feb 2013 23:19:26 -0800 Subject: [PATCH] Make `isKeysFast` true for Firefox too. Former-commit-id: cf14455782375eccc4c32c5bfca41c3f918db2e8 --- lodash.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lodash.js b/lodash.js index 03b157f91..06dc662dd 100644 --- a/lodash.js +++ b/lodash.js @@ -169,13 +169,14 @@ /** Detect various environments */ var isIeOpera = !!context.attachEvent, + isJSC = !/\n{2,}/.test(Function()), isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera); /* Detect if `Function#bind` exists and is inferred to be fast (all but V8) */ var isBindFast = nativeBind && !isV8; - /* Detect if `Object.keys` exists and is inferred to be fast (IE, Opera, V8) */ - var isKeysFast = nativeKeys && (isIeOpera || isV8); + /* Detect if `Object.keys` exists and is inferred to be fast (Firefox, IE, Opera, V8) */ + var isKeysFast = nativeKeys && (isIeOpera || isV8 || !isJSC); /** * Detect the JScript [[DontEnum]] bug: