mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Remove chainability from _.forEach in the lodash underscore build.
Former-commit-id: 1db7daafacddcf78492643d6c6301af706b92150
This commit is contained in:
5
build.js
5
build.js
@@ -1327,6 +1327,11 @@
|
||||
});
|
||||
}());
|
||||
|
||||
// remove chainability from `_.forEach`
|
||||
source = source.replace(matchFunction(source, 'forEach'), function(match) {
|
||||
return match.replace(/return result([};\s]+)$/, '$1');
|
||||
});
|
||||
|
||||
// unexpose "exit early" feature from `_.forEach`, `_.forIn`, and `_.forOwn`
|
||||
_.each(['forEach', 'forIn', 'forOwn'], function(methodName) {
|
||||
source = source.replace(matchFunction(source, methodName), function(match) {
|
||||
|
||||
Reference in New Issue
Block a user