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

Function check

lib.commonjs/utils/fixednumber.js:85–91  ·  view source on GitHub ↗
(key, type, defaultValue)

Source from the content-addressed store, hash-verified

83 // Extract the values from the object
84 const v = value;
85 const check = (key, type, defaultValue) => {
86 if (v[key] == null) {
87 return defaultValue;
88 }
89 (0, errors_js_1.assertArgument)(typeof (v[key]) === type, "invalid fixed format (" + key + " not " + type + ")", "format." + key, v[key]);
90 return v[key];
91 };
92 signed = check("signed", "boolean", signed);
93 width = check("width", "number", width);
94 decimals = check("decimals", "number", decimals);

Callers 1

getFormatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected