mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Use more for-of
This commit is contained in:
@@ -15,12 +15,7 @@ function copyObject(source, props, object, customizer) {
|
||||
const isNew = !object
|
||||
object || (object = {})
|
||||
|
||||
let index = -1
|
||||
const length = props.length
|
||||
|
||||
while (++index < length) {
|
||||
const key = props[index]
|
||||
|
||||
for (const key of props) {
|
||||
let newValue = customizer
|
||||
? customizer(object[key], source[key], key, object, source)
|
||||
: undefined
|
||||
|
||||
Reference in New Issue
Block a user