- cycle<T>(options): {
next: (() => T);
prev: (() => T);
select: ((indexOrValue: number | T) => void);
toArray: (() => T[]);
get current(): T;
} Parameters
- options: readonly T[] | T[]
Returns {
next: (() => T);
prev: (() => T);
select: ((indexOrValue: number | T) => void);
toArray: (() => T[]);
get current(): T;
}
next: (() => T)
prev: (() => T)
select: ((indexOrValue: number | T) => void)
- (indexOrValue): void
Returns void
toArray: (() => T[])
get current(): T
Cycle through the contents of an array. By default starts at index 0.
You can select an item by index or value:
Other features:
Additional info: