The mutable array-like object of interest.
The index of the element to move. Negative values are taken as an offset from the end of the array.
The target index of the element. Negative values are taken as an offset from the end of the array.
Linear.
A fromIndex or toIndex which is non-integral.
import { ArrayExt } from from '@lumino/algorithm';
let data = [0, 1, 2, 3, 4];
ArrayExt.move(data, 1, 2); // [0, 2, 1, 3, 4]
ArrayExt.move(data, 4, 2); // [0, 2, 4, 1, 3]
Generated using TypeDoc
Move an element in an array from one index to another.