MCPcopy Create free account
hub / github.com/nodejs/node / randomArguments

Function randomArguments

deps/v8/tools/clusterfuzz/js_fuzzer/mutators/common.js:293–302  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

291}
292
293function randomArguments(path) {
294 const numArgs = random.randInt(0, MAX_ARGUMENT_COUNT);
295 const args = [];
296
297 for (let i = 0; i < numArgs; i++) {
298 args.push(randomValue(path));
299 }
300
301 return args.map(_unwrapExpressionStatement);
302}
303
304function randomValue(path) {
305 const probability = random.random();

Callers 1

callRandomFunctionFunction · 0.85

Calls 3

randomValueFunction · 0.85
mapMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected