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

Function numberOrRandomValue

packages/core/src/tests/utils.ts:192–194  ·  view source on GitHub ↗
(validness = 0.7, nestingLvl = 1, min?: number, max?: number)

Source from the content-addressed store, hash-verified

190}
191
192export function numberOrRandomValue(validness = 0.7, nestingLvl = 1, min?: number, max?: number) {
193 return randomBoolean(validness) ? randomNumber(min, max) : randomValue(nestingLvl);
194}
195
196export function randomArray(nestingLvl = 2, maxLength = 6): any[] {
197 if (nestingLvl < 0 || !isNumber(nestingLvl)) {

Callers 2

units.spec.tsFile · 0.90
utils.tsFile · 0.85

Calls 3

randomBooleanFunction · 0.85
randomNumberFunction · 0.85
randomValueFunction · 0.85

Tested by

no test coverage detected