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'
import keys from '../keys.js'
@@ -11,7 +10,10 @@ import keys from '../keys.js'
*/
function getAllKeys(object) {
const result = keys(object)
return Array.isArray(object) ? result : arrayPush(result, getSymbols(object))
if (!Array.isArray(object)) {
result.push(...getSymbols(object))
}
return result
}
export default getAllKeys