From 6a9efd8ac6acb965c26572b7aa73a695b1cfb5a3 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 29 Sep 2012 03:41:00 -0700 Subject: [PATCH] Ensure build tests pass. Former-commit-id: 9b91f0d884fe96dce1df34a6c0b659619276b83e --- build.js | 7 +++++-- build/pre-compile.js | 2 +- lodash.js | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build.js b/build.js index 2a8873bc4..774bc3633 100755 --- a/build.js +++ b/build.js @@ -1031,7 +1031,7 @@ } } if (isLegacy) { - _.each(['isBindFast', 'isKeysFast', 'isStrictFast', 'nativeBind', 'nativeIsArray', 'nativeKeys'], function(varName) { + _.each(['isBindFast', 'isKeysFast', 'isStrictFast', 'nativeBind', 'nativeGetPrototypeOf', 'nativeIsArray', 'nativeKeys'], function(varName) { source = replaceVar(source, varName, 'false'); }); @@ -1334,6 +1334,9 @@ if (isRemoved(source, 'isArray')) { source = removeVar(source, 'nativeIsArray'); } + if (isRemoved(source, 'isPlainObject')) { + source = removeVar(source, 'nativeGetPrototypeOf'); + } if (isRemoved(source, 'keys')) { source = removeFunction(source, 'shimKeys'); } @@ -1359,7 +1362,7 @@ source = removeVar(source, 'isStrictFast'); source = removeVar(source, 'nativeBind'); } - if (isRemoved(source, 'createIterator', 'bind', 'isArray', 'keys')) { + if (isRemoved(source, 'createIterator', 'bind', 'isArray', 'isPlainObject', 'keys')) { source = removeVar(source, 'reNative'); } if (isRemoved(source, 'createIterator', 'isEmpty', 'isEqual')) { diff --git a/build/pre-compile.js b/build/pre-compile.js index f2bcffd9c..879e9149a 100644 --- a/build/pre-compile.js +++ b/build/pre-compile.js @@ -274,7 +274,7 @@ // remove whitespace from string literals source = source.replace(/'(?:(?=(\\?))\1.)*?'/g, function(string) { // avoids removing the '\n' of the `stringEscapes` object - return string.replace(/\[object |delete |else if|function | in |return\s+[\w']|throw |typeof |use strict|var |@ |'\\n'|\\\\n|\\n|\s+/g, function(match) { + return string.replace(/\[object |delete |else if|else var |function | in |return\s+[\w']|throw |typeof |use strict|var |@ |'\\n'|\\\\n|\\n|\s+/g, function(match) { return match == false || match == '\\n' ? '' : match; }); }); diff --git a/lodash.js b/lodash.js index 0d7003cf3..e1468cb09 100644 --- a/lodash.js +++ b/lodash.js @@ -523,8 +523,8 @@ 'init': '{}', 'top': 'var isFunc = typeof callback == \'function\';\n' + - 'callback = createCallback(callback, thisArg);\n' + - 'if (!isFunc) var props = concat.apply(ArrayProto, arguments)', + 'if (isFunc) callback = createCallback(callback, thisArg);\n' + + 'else var props = concat.apply(ArrayProto, arguments)', 'inLoop': 'if (isFunc\n' + ' ? !callback(value, index, object)\n' +