Remove arrayPush in favor of spreading arguments.

This commit is contained in:
John-David Dalton
2017-02-21 10:34:25 -08:00
parent 0350d4904f
commit 56b7d339a6
5 changed files with 11 additions and 30 deletions

View File

@@ -1,4 +1,3 @@
import arrayPush from './arrayPush.js'
import getSymbols from './getSymbols.js'
/* Built-in method references for those with the same name as other `lodash` methods. */
@@ -14,7 +13,7 @@ const nativeGetSymbols = Object.getOwnPropertySymbols
const getSymbolsIn = !nativeGetSymbols ? () => [] : object => {
const result = []
while (object) {
arrayPush(result, getSymbols(object))
result.push(...getSymbols(object))
object = Object.getPrototypeOf(Object(object))
}
return result