0.2.9 • Published 7 years ago

iterable-zip v0.2.9

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

iterable-zip

NOTE: iterable-zip was renamed to @extra-iterable/zip. NPM

Merge values of each inner iterable at corresponding position, like _.zip().

iterable-zip is reversible and behaves exactly like iterable-unzip.

const zip = require('iterable-zip');
// zip(<iterable>, [begin=0], [end], [target=[]], [at])

zip([['r', 'i', 'm'], [18, 9, 13]]);
// [['r', 18], ['i', 9], ['m', 13]]
zip([['r', 18], ['i', 9], ['m', 13]]);
// [['r', 'i', 'm'], [18, 9, 13]] (reversible)
zip(['pset', 'line', 'rect', 'fill'], 1);
// [['l', 'r', 'f'], ['i', 'e', 'i'], ['n', 'c', 'l'], ['e', 't', 'l']]
zip(['pset', 'line', 'rect', 'fill'], 1, 3);
// [['l', 'r'], ['i', 'e'], ['n', 'c'], ['e', 't']]
zip(['pset', 'line', 'rect', 'fill'], 1, 3, [['z'], ['y']]);
// [['z'], ['y'], ['l', 'r'], ['i', 'e'], ['n', 'c'], ['e', 't']]
zip(['pset', 'line', 'rect', 'fill'], 1, 3, [['z'], ['y']], 1);
// [['z'], ['l', 'r'], ['i', 'e'], ['n', 'c'], ['e', 't']]
0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago