UNPKG

@extra-array/split-at

Version:

Breaks iterable considering indices as separator.

8 lines (5 loc) 163 B
const array = require("extra-array"); var x = [1, 2, 2, 3, 5, 4, 4, 7]; array.splitAt(x, [1, 2, 5, 6]); var x = [2, 4, 5, 6, 8]; array.splitAt(x, [0, 1, 3, 4]);