MCPcopy Create free account
hub / github.com/TeaCoder52/patcode / resolveRng

Function resolveRng

src/rng.ts:52–64  ·  view source on GitHub ↗
(options?: GenerateOptions)

Source from the content-addressed store, hash-verified

50}
51
52export function resolveRng(options?: GenerateOptions): RngFunction {
53 if (options?.rng) return options.rng
54
55 if (options?.rngProfile && rngRegistry.has(options.rngProfile)) {
56 return rngRegistry.get(options.rngProfile)!
57 }
58
59 if (options?.mode === 'banking') {
60 return rngRegistry.get('secure') ?? defaultSecureRng
61 }
62
63 return rngRegistry.get('insecure') ?? defaultInsecureRng
64}

Callers 1

getRngFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected