extra-array
Advanced tools
Comparing version 4.0.130 to 4.0.131
38
index.js
@@ -1047,2 +1047,21 @@ 'use strict'; | ||
} | ||
function zip(xs, fm = null, fe = null, vd) { | ||
var fm = fm || IDENTITY; | ||
var fe = fe || some; | ||
var X = xs.length, a = []; | ||
if (X === 0) | ||
return a; | ||
var ds = new Array(X).fill(false); | ||
var ls = xs.map(x => x.length); | ||
for (var i = 0;; ++i) { | ||
for (var j = 0, vs = []; j < X; ++j) { | ||
ds[j] = i >= ls[j]; | ||
vs[j] = ds[j] ? vd : xs[j][i]; | ||
} | ||
if (fe(ds)) | ||
break; | ||
a.push(fm(vs, i, null)); | ||
} | ||
return a; | ||
} | ||
function flat(x, n = -1, fm = null, ft = null) { | ||
@@ -1077,21 +1096,2 @@ var fm = fm || IDENTITY; | ||
} | ||
function zip(xs, fm = null, fe = null, vd) { | ||
var fm = fm || IDENTITY; | ||
var fe = fe || some; | ||
var X = xs.length, a = []; | ||
if (X === 0) | ||
return a; | ||
var ds = new Array(X).fill(false); | ||
var ls = xs.map(x => x.length); | ||
for (var i = 0;; ++i) { | ||
for (var j = 0, vs = []; j < X; ++j) { | ||
ds[j] = i >= ls[j]; | ||
vs[j] = ds[j] ? vd : xs[j][i]; | ||
} | ||
if (fe(ds)) | ||
break; | ||
a.push(fm(vs, i, null)); | ||
} | ||
return a; | ||
} | ||
function fill(x, v, i = 0, I = x.length) { | ||
@@ -1098,0 +1098,0 @@ return x.slice().fill(v, i, I); |
{ | ||
"name": "extra-array", | ||
"version": "4.0.130", | ||
"version": "4.0.131", | ||
"description": "An array is a collection of values, stored contiguously.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
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