reports/frontend/node_modules/es-toolkit/dist/fp/array/unzip.mjs
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

24 lines
688 B
JavaScript

import { unzip as unzip$1 } from "../../array/unzip.mjs";
//#region src/fp/array/unzip.ts
/**
* Creates a function that unzips grouped tuples into arrays by position.
*
* The returned function is the data-last form of the main {@link unzip} utility.
* Use it with {@link pipe}.
*
* @template T - The tuple type inside the zipped array.
* @returns A function that maps zipped tuples to arrays grouped by tuple position.
*
* @example
* import { pipe, unzip } from 'es-toolkit/fp';
*
* pipe([[1, 'a'], [2, 'b']] as Array<[number, string]>, unzip());
* // => [[1, 2], ['a', 'b']]
*/
function unzip() {
return function(zipped) {
return unzip$1(zipped);
};
}
//#endregion
export { unzip };