typedash
Version:
modern, type-safe collection of utility functions
16 lines (15 loc) • 482 B
JavaScript
//#region src/functions/zip/zip.ts
/**
* Implementation for all overloads.
* @param first The first array to zip.
* @param second The second array to zip.
* @returns An array of tuples containing the zipped values.
*/
function zip(first, second) {
const result = [];
for (let index = 0; index < Math.min(first.length, second.length); index++) result.push([first[index], second[index]]);
return result;
}
//#endregion
export { zip as t };
//# sourceMappingURL=zip-BYUd7Yr1.js.map