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

Function toBigInt

lib.commonjs/utils/maths.js:116–126  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

114 * is treated as Big Endian data.
115 */
116function toBigInt(value) {
117 if (value instanceof Uint8Array) {
118 let result = "0x0";
119 for (const v of value) {
120 result += Nibbles[v >> 4];
121 result += Nibbles[v & 0x0f];
122 }
123 return BigInt(result);
124 }
125 return getBigInt(value);
126}
127exports.toBigInt = toBigInt;
128/**
129 * Gets a //number// from %%value%%. If it is an invalid value for

Callers 1

toNumberFunction · 0.70

Calls 1

getBigIntFunction · 0.70

Tested by

no test coverage detected