basant307/AI_Governance_Project
045
1import arrayLikeKeys from './_arrayLikeKeys.js';2import baseKeys from './_baseKeys.js';3import isArrayLike from './isArrayLike.js';4 5/**6 * Creates an array of the own enumerable property names of `object`.7 *8 * **Note:** Non-object values are coerced to objects. See the9 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)10 * for more details.11 *12 * @static13 * @since 0.1.014 * @memberOf _15 * @category Object16 * @param {Object} object The object to query.17 * @returns {Array} Returns the array of property names.18 * @example19 *20 * function Foo() {21 * this.a = 1;22 * this.b = 2;23 * }24 *25 * Foo.prototype.c = 3;26 *27 * _.keys(new Foo);28 * // => ['a', 'b'] (iteration order is not guaranteed)29 *30 * _.keys('hi');31 * // => ['0', '1']32 */33function keys(object) {34 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);35}36 37export default keys;38 