mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Reduce _.uniq in the lodash underscore build.
Former-commit-id: 12c8ee7a269dbaebbe4d05d902bfcc4bed193cec
This commit is contained in:
5
build.js
5
build.js
@@ -1188,6 +1188,11 @@
|
||||
// simplify DOM node check from `_.isEqual`
|
||||
source = source.replace(/(if *\(className *!= *objectClass).+?noNodeClass[\s\S]+?{/, '$1) {');
|
||||
|
||||
// remove arguments juggling from `_.uniq`
|
||||
source = source.replace(matchFunction(source, 'uniq'), function(match) {
|
||||
return match.replace(/(?: *\/\/.*\n)*( +)if *\(typeof isSorted[^}]+?}\n/, '');
|
||||
});
|
||||
|
||||
// unexpose "exit early" feature from `_.forEach`, `_.forIn`, and `_.forOwn`
|
||||
source = source.replace(/( +)var forEachIteratorOptions *=[\s\S]+?\n\1.+?;/, function(match) {
|
||||
return match.replace(/=== *false\)/, '=== objectTypes)');
|
||||
|
||||
Reference in New Issue
Block a user