mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
22 lines
508 B
JavaScript
22 lines
508 B
JavaScript
import getSymbolsIn from './getSymbolsIn.js'
|
|
|
|
/**
|
|
* Creates an array of own and inherited 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 getAllKeysIn(object) {
|
|
const result = []
|
|
for (const key in object) {
|
|
result.push(key)
|
|
}
|
|
if (!Array.isArray(object)) {
|
|
result.push(...getSymbolsIn(object))
|
|
}
|
|
return result
|
|
}
|
|
|
|
export default getAllKeysIn
|