moveItem
moveItem<
T>(from,to,item,index?):boolean
Defined in: src/modules/pile/pile-array.ts:46
Move one item from from into to at index (default: on top). The
first === match in from is removed first, so with from === to index
counts positions after that removal, which is how you reorder an array. An
out-of-range index is clamped and a fractional one truncated.
Returns false — changing neither array — when item is not in from.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”T[]
T[]
T
index?
Section titled “index?”number
Returns
Section titled “Returns”boolean