@newdash/newdash
Version:
javascript/typescript utility library
25 lines (24 loc) • 787 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const getSymbolsIn_1 = __importDefault(require("./getSymbolsIn"));
/**
* 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(...(0, getSymbolsIn_1.default)(object));
}
return result;
}
exports.default = getAllKeysIn;