extra-iterable
Advanced tools
Comparing version 3.0.123 to 3.0.124
@@ -767,3 +767,3 @@ /** | ||
/** | ||
* Check if iterable starts with a prefix. TODO | ||
* Check if iterable starts with a prefix. | ||
* [📘](https://github.com/nodef/extra-iterable/wiki/hasPrefix) | ||
@@ -774,3 +774,3 @@ * @param x an iterable | ||
* @param fm map function (v, i, x) | ||
* @returns TODO | ||
* @returns x[0..|y|] = y? | ||
* */ | ||
@@ -780,3 +780,3 @@ | ||
/** | ||
* Check if iterable ends with a suffix. TODO | ||
* Check if iterable ends with a suffix. | ||
* [📘](https://github.com/nodef/extra-iterable/wiki/hasSuffix) | ||
@@ -787,3 +787,3 @@ * @param x an iterable | ||
* @param fm map function (v, i, x) | ||
* @returns TODO | ||
* @returns x[|x|-|y|..] = y? | ||
* */ | ||
@@ -928,3 +928,3 @@ | ||
/** | ||
* Combine values from iterables. TODO | ||
* Combine values from iterables. | ||
* [📘](https://github.com/nodef/extra-iterable/wiki/zip) | ||
@@ -931,0 +931,0 @@ * @param xs iterables |
14
index.js
@@ -563,6 +563,6 @@ 'use strict'; | ||
for (var v of y) { | ||
var { value, done } = ix.next(); | ||
if (done) | ||
var a = ix.next(); | ||
if (a.done) | ||
return false; | ||
var u1 = fm(value, ++i, x); | ||
var u1 = fm(a.value, ++i, x); | ||
var v1 = fm(v, i, y); | ||
@@ -578,8 +578,8 @@ if (fc(u1, v1) !== 0) | ||
var y1 = from$(y), Y = y1.length; | ||
var a = [], ai = 0, n = 0; | ||
var a = [], k = 0, n = 0; | ||
if (Y === 0) | ||
return true; | ||
for (var u of x) { | ||
a[ai++ % Y] = u; | ||
n++; | ||
a[k++ % Y] = u; | ||
++n; | ||
} | ||
@@ -589,3 +589,3 @@ if (a.length < Y) | ||
for (var i = 0, j = n - Y; i < Y; ++i, ++j) { | ||
var u1 = fm(a[ai++ % Y], j, x); | ||
var u1 = fm(a[k++ % Y], j, x); | ||
var v1 = fm(y1[i], i, y); | ||
@@ -592,0 +592,0 @@ if (fc(u1, v1) !== 0) |
{ | ||
"name": "extra-iterable", | ||
"version": "3.0.123", | ||
"version": "3.0.124", | ||
"description": "An iterable is a sequence of values.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
124818