UIZE JavaScript Framework

TO DO - Uize.Array.Interlace

This is a proposal document for a Uize.Array.Interlace module.

The Uize.Array.Interlace module would let you interlace multiple arrays into a single interlaced array, or deinterlace an interlaced array to produce the separate source arrays.

1. Static Methods

1.1. Uize.Array.Interlace.interlace

SYNTAX

interlacedARRAY = Uize.Array.Interlace.interlace (sourceArraysARRAY,optionsOBJ);

EXAMPLE

Uize.Array.Interlace.interlace ([[0,1,2],['a','b','c'],['X','Y','Z']]);

RESULT

[0,'a','X',1,'b','Y',2,'c','Z'];

1.2. Uize.Array.Interlase.deinterlace

SYNTAX

sourceArraysARRAY = Uize.Array.Interlace.deinterlace (interlacedARRAY,totalSourceArraysINT);

EXAMPLE

Uize.Array.Interlace.deinterlace ([0,'a','X',1,'b','Y',2,'c','Z'],3);

RESULT

[[0,1,2],['a','b','c'],['X','Y','Z']];