MCPcopy Create free account
hub / github.com/Pecunia-Wallet/PecuniaWallet / shuffle

Function shuffle

src/app/components/code/code.component.ts:151–157  ·  view source on GitHub ↗
(arr: T[])

Source from the content-addressed store, hash-verified

149 }
150
151 shuffle<T>(arr: T[]): T[] {
152 for (let i = arr.length - 1; i > 0; i--) {
153 const j = Math.floor(Math.random() * (i + 1));
154 [arr[i], arr[j]] = [arr[j], arr[i]];
155 }
156 return arr;
157 }
158
159 range(startInclusive: number, endExclusive: number): number[] {
160 const range: number[] = [];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected