mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Cleanup _.template docs and generate less unused code in compiled templates.
Former-commit-id: e6703414b83e9286d9ce5e14214375bbbaf9285f
This commit is contained in:
@@ -264,11 +264,8 @@
|
||||
// http://code.google.com/closure/compiler/docs/api-tutorial3.html#export
|
||||
source = source.replace(RegExp('\\.(' + propWhitelist.join('|') + ')\\b', 'g'), "['$1']");
|
||||
|
||||
// remove brackets from `_.escape()` in `tokenizeEscape`
|
||||
source = source.replace(/_\['escape']\("/, '_.escape("');
|
||||
|
||||
// remove brackets from `_.escape()` in `_.template`
|
||||
source = source.replace(/__e *= *_\['escape']/, '__e=_.escape');
|
||||
source = source.replace(/__e *= *_\['escape']/g, '__e=_.escape');
|
||||
|
||||
// remove brackets from `collection.indexOf` in `_.contains`
|
||||
source = source.replace("collection['indexOf'](target)", 'collection.indexOf(target)');
|
||||
|
||||
Reference in New Issue
Block a user