Skip to content

akainth015/sparse-zip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sparse Zip

This package helps align and zip two misaligned input sources. Currently it only supports arrays, but support for generators will be implemented soon.

const {sparseZip} = require("sparse-zip");

const admins = [0, 2, 4, 6, "a", "b", "c", 8];
const adminData = [1, 3, 5, 7, 9];

sparseZip(admins, adminData, (admin) => typeof admin === "number") == [
    [0, 1],
    [2, 3],
    [4, 5],
    [6, 7],
    [8, 9]
];

About

Zip two separate misaligned iterables together

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published