Use more for-of

This commit is contained in:
John-David Dalton
2017-04-03 10:35:26 -07:00
parent f3957ac416
commit 3e2b0bb763
7 changed files with 18 additions and 33 deletions

View File

@@ -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