source: node_modules/es-toolkit/dist/compat/object/toPairs.d.mts

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

Added visualizations

  • Property mode set to 100644
File size: 789 bytes
RevLine 
[a762898]1/**
2 * Creates an array of key-value pairs from an object.
3 *
4 * @template T
5 * @param {Record<string, T> | Record<number, T>} object - The object to query.
6 * @returns {Array<[string, T]>} Returns the array of key-value pairs.
7 *
8 * @example
9 * const object = { a: 1, b: 2 };
10 * toPairs(object); // [['a', 1], ['b', 2]]
11 */
12declare function toPairs<T>(object?: Record<string, T> | Record<number, T>): Array<[string, T]>;
13/**
14 * Creates an array of key-value pairs from an object.
15 *
16 * @param {object} object - The object to query.
17 * @returns {Array<[string, any]>} Returns the array of key-value pairs.
18 *
19 * @example
20 * const object = { a: 1, b: 2 };
21 * toPairs(object); // [['a', 1], ['b', 2]]
22 */
23declare function toPairs(object?: object): Array<[string, any]>;
24
25export { toPairs };
Note: See TracBrowser for help on using the repository browser.