MCPcopy
hub / github.com/mongodb/node-mongodb-native / zip

Function zip

test/tools/unified-spec-runner/unified-utils.ts:177–185  ·  view source on GitHub ↗
(
  iter1: T[],
  iter2: U[]
)

Source from the content-addressed store, hash-verified

175
176/** Turns two lists into a joined list of tuples. Uses longer array length */
177export function* zip<T = unknown, U = unknown>(
178 iter1: T[],
179 iter2: U[]
180): Generator<[T | undefined, U | undefined], void> {
181 const longerArrayLength = Math.max(iter1.length, iter2.length);
182 for (let index = 0; index < longerArrayLength; index++) {
183 yield [iter1[index], iter2[index]];
184 }
185}
186
187/** Correct schema version to be semver compliant */
188export function patchVersion(version: string): string {

Callers 1

runUnifiedTestFunction · 0.90

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected