MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / assert

Function assert

lib.esm/utils/errors.js:149–153  ·  view source on GitHub ↗
(check, message, code, info)

Source from the content-addressed store, hash-verified

147 * @see [[api:makeError]]
148 */
149export function assert(check, message, code, info) {
150 if (!check) {
151 throw makeError(message, code, info);
152 }
153}
154/**
155 * A simple helper to simply ensuring provided arguments match expected
156 * constraints, throwing if not.

Callers 15

randomBytesFunction · 0.90
_decodeChildrenFunction · 0.90
_decodeFunction · 0.90
checkOffsetFunction · 0.90
fromTwosFunction · 0.90
toTwosFunction · 0.90
getUintFunction · 0.90
toBeHexFunction · 0.90
dataSliceFunction · 0.90
zeroPadFunction · 0.90
getUrlFunction · 0.90
getUrlFunction · 0.90

Calls 1

makeErrorFunction · 0.70

Tested by

no test coverage detected