mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
20 lines
469 B
JavaScript
20 lines
469 B
JavaScript
import getSymbols from './getSymbols.js'
|
|
import keys from '../keys.js'
|
|
|
|
/**
|
|
* Creates an array of own enumerable property names and symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function getAllKeys(object) {
|
|
const result = keys(object)
|
|
if (!Array.isArray(object)) {
|
|
result.push(...getSymbols(object))
|
|
}
|
|
return result
|
|
}
|
|
|
|
export default getAllKeys
|