Reduce underscore build size.

Former-commit-id: 207d4ab49063483245dc951d4646413d6d4a1903
This commit is contained in:
John-David Dalton
2012-09-29 12:04:40 -07:00
parent f31598f916
commit 82bc52b909
4 changed files with 38 additions and 17 deletions

View File

@@ -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|else var |function | in |return\s+[\w']|throw |typeof |use strict|var |@ |'\\n'|\\\\n|\\n|\s+/g, function(match) {
return string.replace(/\[object |delete |else |function | in |return\s+[\w']|throw |typeof |use strict|var |@ |'\\n'|\\\\n|\\n|\s+/g, function(match) {
return match == false || match == '\\n' ? '' : match;
});
});