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

Function randomInitialValue

packages/core/src/tests/utils.ts:411–417  ·  view source on GitHub ↗
(
  unit: (new () => UnitBase<any> | Action<any>) | UnitBase<any> | Action<any>,
  validness = 0.7,
  nestingLvl = 1
)

Source from the content-addressed store, hash-verified

409}
410
411export function randomInitialValue(
412 unit: (new () => UnitBase<any> | Action<any>) | UnitBase<any> | Action<any>,
413 validness = 0.7,
414 nestingLvl = 1
415) {
416 return randomBoolean(validness) ? randomValidValue(unit) : randomValue(nestingLvl);
417}
418
419export function randomAsyncSystemInitialValue(validness = 0.7, nestingLvl = 1) {
420 return {

Callers 2

somewhatValidConfigFunction · 0.85

Calls 3

randomBooleanFunction · 0.85
randomValidValueFunction · 0.85
randomValueFunction · 0.85

Tested by

no test coverage detected