BigArray in code

This commit is contained in:
Jordi Baylina
2020-07-30 05:04:15 +02:00
parent 0e1a1bcc23
commit 1e2fb12631
4 changed files with 15 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
const BigArray = require("./bigArray");
const Readable = require("stream").Readable;
module.exports = function streamFromArrayTxt(ma) {
@@ -22,7 +22,7 @@ module.exports = function streamFromArrayTxt(ma) {
function getFirstIdx(ma) {
if (!Array.isArray(ma)) return [];
if (typeof ma.push !== "function" ) return [];
return [0, ...getFirstIdx(ma[0])];
}