mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Make lodash work with modules by avoiding circular dependencies.
Former-commit-id: 57161fd81b837db22fcfe1d318e220f6ca4b1e21
This commit is contained in:
@@ -321,7 +321,7 @@
|
||||
|
||||
// minify internal properties
|
||||
(function() {
|
||||
var methods = [
|
||||
var methodNames = [
|
||||
'cacheIndexOf',
|
||||
'cachePush',
|
||||
'compareAscending',
|
||||
@@ -339,7 +339,12 @@
|
||||
'value'
|
||||
];
|
||||
|
||||
var snippets = source.match(RegExp('^( *)(?:var|function) +(?:' + methods.join('|') + ')\\b[\\s\\S]+?\\n\\1}', 'gm'));
|
||||
// minify `iteratorObject.keys`
|
||||
source.replace(/\b(iteratorObject(?:\.|\['))keys\b/g, function(match, prelude) {
|
||||
return prelude + minNames[iteratorOptions.length + props.length];
|
||||
});
|
||||
|
||||
var snippets = source.match(RegExp('^( *)(?:var|function) +(?:' + methodNames.join('|') + ')\\b[\\s\\S]+?\\n\\1}', 'gm'));
|
||||
if (!snippets) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user