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

Function booleanOrRandomValue

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

Source from the content-addressed store, hash-verified

182}
183
184export function booleanOrRandomValue(validness = 0.7, nestingLvl = 1) {
185 return randomBoolean(validness) ? randomBoolean() : randomValue(nestingLvl);
186}
187
188export function stringOrRandomValue(validness = 0.7, nestingLvl = 1) {
189 return randomBoolean(validness) ? randomString() : randomValue(nestingLvl);

Callers 4

dict-unit.spec.tsFile · 0.90
list-unit.spec.tsFile · 0.90
utils.tsFile · 0.85

Calls 2

randomBooleanFunction · 0.85
randomValueFunction · 0.85

Tested by

no test coverage detected