mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Remove arrayPush in favor of spreading arguments.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user