mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 07:57:59 +00:00
16 lines
421 B
JavaScript
16 lines
421 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.arrayZip = arrayZip;
|
|
/**
|
|
* @name arrayZip
|
|
* @description Combines 2 distinct key/value arrays into a single [K, V] array
|
|
*/
|
|
function arrayZip(keys, values) {
|
|
const count = keys.length;
|
|
const result = new Array(count);
|
|
for (let i = 0; i < count; i++) {
|
|
result[i] = [keys[i], values[i]];
|
|
}
|
|
return result;
|
|
}
|