mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 17:07:49 +00:00
lodash: Optimize template. [jddalton]
Former-commit-id: 2cd61549491714e6796308ec437fa8dff8fa9a1b
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
'isEqual',
|
||||
'isFinite',
|
||||
'setTimeout',
|
||||
'source',
|
||||
'templateSettings',
|
||||
'toArray',
|
||||
'value',
|
||||
@@ -112,7 +113,7 @@
|
||||
|
||||
// remove whitespace from string literals
|
||||
source = source.replace(/'(?:(?=(\\?))\1.)*?'/g, function(string) {
|
||||
return string.replace(/\[object |else if|function | in |return\s+[\w']|throw |use strict|var |'\\n'|\\n|\s+/g, function(match) {
|
||||
return string.replace(/\[object |else if|function | in |return\s+[\w']|throw |use strict|var |['|]\\n[|']|\\n|\s+/g, function(match) {
|
||||
return match == false || match == '\\n' ? '' : match;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user