The namespace for the slice function statics.
slice
Create a slice of an array subject to an optional step.
An exception if the slice step is 0.
step
0
Linear.
A start, stop, or step which is non-integral.
start
stop
import { ArrayExt } from '@phosphor/algorithm'; let data = [0, 3, 4, 7, 7, 9]; ArrayExt.slice(data); // [0, 3, 4, 7, 7, 9] ArrayExt.slice(data, { start: 2 }); // [4, 7, 7, 9] ArrayExt.slice(data, { start: 0, stop: 4 }); // [0, 3, 4, 7] ArrayExt.slice(data, { step: 2 }); // [0, 4, 7] ArrayExt.slice(data, { step: -1 }); // [9, 7, 7, 4, 3, 0]
The array-like object of interest.
The options for configuring the slice.
A new array with the specified values.
The namespace for the
slice
function statics.