source: node_modules/es-toolkit/dist/compat/object/keys.d.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 574 bytes
Line 
1/**
2 * Creates an array of the own enumerable property names of `object`.
3 *
4 * Non-object values are coerced to objects.
5 *
6 * @param {object} object The object to query.
7 * @returns {string[]} Returns the array of property names.
8 * @example
9 * function Foo() {
10 * this.a = 1;
11 * this.b = 2;
12 * }
13 * Foo.prototype.c = 3;
14 * keys(new Foo); // ['a', 'b'] (iteration order is not guaranteed)
15 *
16 * keys('hi'); // ['0', '1']
17 * keys([1, 2, 3]); // ['0', '1', '2']
18 * keys({ a: 1, b: 2 }); // ['a', 'b']
19 */
20declare function keys(object?: any): string[];
21
22export { keys };
Note: See TracBrowser for help on using the repository browser.