Interleave n typed arrays.
npm install interleave-typed-array
import interleaveTypedArray from "interleave-typed-array";
interleaveTypedArray(
Uint8Array,
[3, 2],
Uint8Array.of(1, 2, 3, 4, 5, 6),
Uint8Array.of(7, 8, 9, 10)
);
//=> Uint8Array [1, 2, 3, 7, 8, 4, 5, 6, 9, 10]
TypedArray
⏏Interleave n typed arrays
Kind: Exported function
Param | Type | Description |
---|---|---|
ResultConstructor | TypedArray |
Returned typed array constructor |
elements | Array |
Number of elements to group for each typed array |
...arrays | TypedArray |
Arrays to interleave |
MIT. See license file.