MCPcopy Create free account
hub / github.com/activejs/activejs / stringOrRandomValue

Function stringOrRandomValue

packages/core/src/tests/utils.ts:188–190  ·  view source on GitHub ↗
(validness = 0.7, nestingLvl = 1)

Source from the content-addressed store, hash-verified

186}
187
188export function stringOrRandomValue(validness = 0.7, nestingLvl = 1) {
189 return randomBoolean(validness) ? randomString() : randomValue(nestingLvl);
190}
191
192export function numberOrRandomValue(validness = 0.7, nestingLvl = 1, min?: number, max?: number) {
193 return randomBoolean(validness) ? randomNumber(min, max) : randomValue(nestingLvl);

Callers 1

utils.tsFile · 0.85

Calls 3

randomBooleanFunction · 0.85
randomStringFunction · 0.85
randomValueFunction · 0.85

Tested by

no test coverage detected