MCPcopy Index your code
hub / github.com/stemkoski/stemkoski.github.com / verifuint

Function verifuint

MathBox/mathbox-bundle.js:48703–48708  ·  view source on GitHub ↗
(value, max)

Source from the content-addressed store, hash-verified

48701 * exceed the maximum allowed value.
48702 */
48703function verifuint (value, max) {
48704 assert(typeof value === 'number', 'cannot write a non-number as a number')
48705 assert(value >= 0, 'specified a negative value for writing an unsigned value')
48706 assert(value <= max, 'value is larger than maximum value for type')
48707 assert(Math.floor(value) === value, 'value has a fractional component')
48708}
48709
48710function verifsint (value, max, min) {
48711 assert(typeof value === 'number', 'cannot write a non-number as a number')

Callers 3

mathbox-bundle.jsFile · 0.70
_writeUInt16Function · 0.70
_writeUInt32Function · 0.70

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected