Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/nodejs/node
/ shuffle
Function
shuffle
deps/v8/tools/clusterfuzz/js_fuzzer/random.js:117–124 ·
view source on GitHub ↗
(array)
Source
from the content-addressed store, hash-verified
115
}
116
117
function
shuffle(array) {
118
for
(
let
i = 0; i < array.length - 1; i++) {
119
const
j = randInt(i, array.length - 1);
120
swap(array, i, j);
121
}
122
123
return
array;
124
}
125
126
module.exports = {
127
choose: choose,
Callers
1
sample
Function · 0.85
Calls
2
randInt
Function · 0.70
swap
Function · 0.70
Tested by
no test coverage detected