UNPKG

448 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.arrayZip = void 0;
4/**
5 * @name arrayZip
6 * @description Combines 2 distinct key/value arrays into a single [K, V] array
7 */
8function arrayZip(keys, values) {
9 const count = keys.length;
10 const result = new Array(count);
11 for (let i = 0; i < count; i++) {
12 result[i] = [keys[i], values[i]];
13 }
14 return result;
15}
16exports.arrayZip = arrayZip;