diff --git a/example/src/functions/Helpers.ts b/example/src/functions/Helpers.ts index ce9cc7f9..d9f1d22e 100644 --- a/example/src/functions/Helpers.ts +++ b/example/src/functions/Helpers.ts @@ -90,3 +90,7 @@ export function promiseWithTimeout(ms: number, promise: Promise) { export function pad(num: number | string, places = 2) { return String(num).padStart(places, '0'); } + +export function getNextItemInCyclicArray(index: number, array: Array): T { + return array[index % array.length]; +} \ No newline at end of file