mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Optimize _.forEach, _.forIn, and _.forOwn.
Former-commit-id: 5d3b83ec0d5240ee14a86421994de86f311089fd
This commit is contained in:
4
build.js
4
build.js
@@ -1689,7 +1689,9 @@
|
||||
], function(data) {
|
||||
if (!data.flag) {
|
||||
source = source.replace(matchFunction(source, data.methodName), function(match) {
|
||||
return match.replace(/(callback), *thisArg/g, '$1');
|
||||
return match
|
||||
.replace(/(callback), *thisArg/g, '$1')
|
||||
.replace(/^ *callback *=.+/m, 'callback || (callback = identity);')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user