source: node_modules/es-toolkit/dist/compat/array/unzip.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: 622 bytes
Line 
1/**
2 * Gathers elements in the same position in an internal array
3 * from a grouped array of elements and returns them as a new array.
4 *
5 * @template T - The type of elements in the nested array.
6 * @param {T[][] | ArrayLike<ArrayLike<T>> | null | undefined} array - The nested array to unzip.
7 * @returns {T[][]} A new array of unzipped elements.
8 *
9 * @example
10 * const zipped = [['a', true, 1],['b', false, 2]];
11 * const result = unzip(zipped);
12 * // result will be [['a', 'b'], [true, false], [1, 2]]
13 */
14declare function unzip<T>(array: T[][] | ArrayLike<ArrayLike<T>> | null | undefined): T[][];
15
16export { unzip };
Note: See TracBrowser for help on using the repository browser.