mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Optimize _.pairs.
Former-commit-id: 1de87609a8635fb8d48bc558fbdabc545da53b4b
This commit is contained in:
2
build.js
2
build.js
@@ -595,7 +595,7 @@
|
||||
.replace(/(?: *\/\/.*\n)*\s*'( *)<% *if *\(isKeysFast[\s\S]+?'\1<% *} *else *\{ *%>.+\n([\s\S]+?) *'\1<% *} *%>.+/, '$2')
|
||||
// remove `isKeysFast` from `beforeLoop.object` of `mapIteratorOptions`
|
||||
.replace(/=\s*'\s*\+\s*\(isKeysFast.+/, "= []'")
|
||||
// remove `isKeysFast` from `inLoop.object` of `mapIteratorOptions`, `invoke`, `pluck`, and `sortBy`
|
||||
// remove `isKeysFast` from `inLoop.object` of `mapIteratorOptions`, `invoke`, `pairs`, `pluck`, and `sortBy`
|
||||
.replace(/'\s*\+\s*\(isKeysFast[^)]+?\)\s*\+\s*'/g, '.push')
|
||||
// remove data object property assignment in `createIterator`
|
||||
.replace(/\s*.+?\.isKeysFast *=.+/, '');
|
||||
|
||||
Reference in New Issue
Block a user