2.2.30 • Published 5 years ago

@extra-iterable/zip-first v2.2.30

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

Combines values from iterables, till first. :running: :package: :ledger:

Alternatives: zip, zipShortest, zipLongest, zipFirst. This is part of package extra-iterable.

iterable.zipFirst(xs, [vd], [fn], [ths]);
// xs:  iterables
// vd:  default value
// fn:  map function (vs, i, xs)
// ths: this argument
const iterable = require('extra-iterable');

var x = [1, 2, 3];
var y = [4, 5];
[...iterable.zipFirst([x, y], 0)];
// [ [ 1, 4 ], [ 2, 5 ], [ 3, 0 ] ]

[...iterable.zipFirst([x, y], 0, ([a, b]) => a + b)];
// [ 5, 7, 3 ]

references

2.2.30

5 years ago

2.2.29

5 years ago

2.2.28

5 years ago

2.2.27

5 years ago

2.2.26

5 years ago

2.2.25

5 years ago

2.2.24

5 years ago

2.2.23

5 years ago

2.2.22

5 years ago

2.2.21

5 years ago