1.0.2 • Published 4 years ago

zipiterators v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

zipiterators

GitHub repo size GitHub top language

A utility function for zipping JavaScript iterables, since there's no helper in the standard library.

Usage

import { zipiterators } from 'zipiterators';

// Instantiating the iterator for usage...

const first = [ 1, 2, 3 ];
const second = first.map(x => x * x);
const iterable = zipiterators(first, second);

// Later...

const values = Array.from(iterable);
console.log(values);

/* Outputs:
 * [ [1, 1], [2, 4], [3, 9] ]
 */
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago