From 24fd17f0722727fb9c53320f45f17a6a16b9ea0f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 18 May 2013 19:32:16 -0700 Subject: [PATCH] Replace `_.isPlainObject` with `shimIsPlainObject`. Former-commit-id: c1c273a352387e25ae5a6a22dfda8871beac8400 --- build.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/build.js b/build.js index 7f13eda4c..4c061c432 100755 --- a/build.js +++ b/build.js @@ -1963,11 +1963,7 @@ source = removeSupportProp(source, 'fastBind'); source = replaceSupportProp(source, 'argsClass', 'false'); - _.each(['getPrototypeOf'], function(varName) { - source = replaceVar(source, varName, 'false'); - }); - - _.each(['isIeOpera', 'isV8', 'nativeBind', 'nativeCreate', 'nativeIsArray', 'nativeKeys', 'reNative'], function(varName) { + _.each(['isIeOpera', 'isV8', 'getPrototypeOf', 'nativeBind', 'nativeCreate', 'nativeIsArray', 'nativeKeys', 'reNative'], function(varName) { source = removeVar(source, varName); }); @@ -1998,6 +1994,14 @@ source = util.remove(source); }); + // replace `_.isPlainObject` with `shimIsPlainObject` + source = source.replace( + matchFunction(source, 'isPlainObject').replace(/[\s\S]+?var isPlainObject *= */, ''), + matchFunction(source, 'shimIsPlainObject').replace(/[\s\S]+?function shimIsPlainObject/, 'function') + ); + + source = removeFunction(source, 'shimIsPlainObject'); + // replace `_.keys` with `shimKeys` source = source.replace( matchFunction(source, 'keys').replace(/[\s\S]+?var keys *= */, ''),