MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / assertInteger

Function assertInteger

packages/testkit/src/fuzz.ts:225–229  ·  view source on GitHub ↗
(name: string, value: number)

Source from the content-addressed store, hash-verified

223}
224
225function assertInteger(name: string, value: number): void {
226 if (!Number.isInteger(value)) {
227 throw new Error(`${name} must be an integer (got ${String(value)})`);
228 }
229}
230
231function assertNonNegativeInteger(name: string, value: number): void {
232 assertInteger(name, value);

Callers 4

randomIntFunction · 0.85
chanceFunction · 0.85
assertNonNegativeIntegerFunction · 0.85
assertPositiveIntegerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected