Reduce Underscore build and update Underscore version number.

Former-commit-id: fd631cd5525fa287c2af493bfe4a93668678977d
This commit is contained in:
John-David Dalton
2012-10-06 20:58:21 -07:00
parent b07ef98c8f
commit c33825a904
5 changed files with 47 additions and 43 deletions

View File

@@ -1256,8 +1256,14 @@
});
if (isUnderscore) {
// remove compiled template cleanup from `_.template`
source = source.replace(/(?:\s*\/\/.*)*\n *source *=.+?isEvaluating.+?reEmptyStringLeading[\s\S]+?\);/, '');
source = removeVar(source, 'reEmptyStringLeading');
source = removeVar(source, 'reEmptyStringMiddle');
source = removeVar(source, 'reEmptyStringTrailing');
// replace `isArguments` and its fallback
(function() {
// replace `isArguments` and its fallback
var snippet = matchFunction(source, 'isArguments')
.replace(/function isArguments/, 'lodash.isArguments = function');