Add _#toString and _#valueOf.

Former-commit-id: adb194b6270fc72f794c69343891a2e891b90051
This commit is contained in:
John-David Dalton
2012-11-18 21:50:41 -08:00
parent 20630aeb47
commit 819d4abaa2
4 changed files with 48 additions and 1 deletions

View File

@@ -1413,6 +1413,9 @@
// remove conditional `charCodeCallback` use from `_.max` and `_.min`
source = source.replace(/!callback *&& *isString\(collection\)[\s\S]+?: */g, '');
// remove `lodash.prototype.toString` and `lodash.prototype.valueOf` assignments
source = source.replace(/ *lodash\.prototype\.(?:toString|valueOf) *=.+\n/g, '');
// remove unused features from `createBound`
if (buildMethods.indexOf('partial') == -1) {
source = source.replace(matchFunction(source, 'createBound'), function(match) {