diff options
Diffstat (limited to 'src/util.ts')
-rw-r--r-- | src/util.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.ts b/src/util.ts index 43bb2d8..67cf4b5 100644 --- a/src/util.ts +++ b/src/util.ts @@ -11,7 +11,7 @@ export function jsonToQuery(data): string { return Object.entries(data || {}).map(e => e.join('=')).join('&') } -export function shuffle(a): string { +export function shuffle<T>(a: T[]): T[] { for (let i = a.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)) ;[a[i], a[j]] = [a[j], a[i]] |