@extra-array/interleave

Merges values from arrays.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@extra-array/interleave
1402.10.197 months ago3 years agoMinified + gzip package size for @extra-array/interleave in KB

Readme

Merges values from arrays. :package: :smileycat: :running: :vhs: :moon: :scroll: :newspaper: :bluebook:
Similar: interleave, intermix, interpolate, intersperse.

This is part of package extra-array.



array.interleave(xs);
// xs: arrays

const array = require("extra-array");

var x = [1, 2, 3, 4];
var y = [10, 20, 30, 40];
array.interleave([x, y]);
// [ 1, 10, 2, 20, 3, 30, 4, 40 ]

var y = [10, 20];
array.interleave([x, y]);
// [ 1, 10, 2, 20, 3, 4 ]



References