MCPcopy
hub / github.com/prisma/prisma / assertUnsigned

Function assertUnsigned

helpers/compile/plugins/fill-plugin/fillers/buffer-small.ts:609–617  ·  view source on GitHub ↗
(value: number, argName: string, maxValue = MAX_UNSIGNED_32_BIT + 1)

Source from the content-addressed store, hash-verified

607}
608
609function assertUnsigned(value: number, argName: string, maxValue = MAX_UNSIGNED_32_BIT + 1) {
610 if (value < 0 || value > maxValue) {
611 const e = new RangeError(
612 `The value of "${argName}" is out of range. It must be >= 0 && <= ${maxValue}. Received ${value}`,
613 )
614 e['code'] = 'ERR_OUT_OF_RANGE'
615 throw e
616 }
617}
618
619function assertNumber(value: any, argName: string): asserts value is number {
620 if (typeof value !== 'number') {

Callers 12

readIntBEMethod · 0.85
readIntLEMethod · 0.85
readUIntBEMethod · 0.85
readUIntLEMethod · 0.85
writeUIntBEMethod · 0.85
writeUIntLEMethod · 0.85
compareMethod · 0.85
copyMethod · 0.85
writeMethod · 0.85
fillMethod · 0.85
genericReadMethodFunction · 0.85
genericWriteMethodFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected