MCPcopy
hub / github.com/tailwindlabs/tailwindcss / shuffle

Function shuffle

packages/tailwindcss/src/sort.test.ts:122–129  ·  view source on GitHub ↗
(arr: T[])

Source from the content-addressed store, hash-verified

120}
121
122function shuffle<T>(arr: T[]): T[] {
123 for (let i = arr.length - 1; i > 0; i--) {
124 let j = Math.round(Math.random() * i)
125 ;[arr[i], arr[j]] = [arr[j], arr[i]]
126 }
127
128 return arr
129}

Callers 1

sort.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected