list_helpers.ts

Declarations
#

2 declarations

view source

reorder_list
#

list_helpers.ts view source

(items: any[], from_index: number, to_index: number): void

Reorders an array, mutating it by moving an item from one index to another.

items

type any[]

from_index

type number

to_index

type number

returns

void

to_reordered_list
#

list_helpers.ts view source

<T>(items: T[], from_index: number, to_index: number): T[]

Creates a new reordered array without modifying the original.

items

type T[]

from_index

type number

to_index

type number

returns

T[]

Imported by
#