UNPKG

typedash

Version:

modern, type-safe collection of utility functions

22 lines (20 loc) 568 B
//#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 Object.defineProperty(exports, 'zip', { enumerable: true, get: function () { return zip; } }); //# sourceMappingURL=zip-CpA3kYsf.cjs.map