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

Function toNumber

lib.commonjs/utils/maths.js:159–161  ·  view source on GitHub ↗

* Converts %%value%% to a number. If %%value%% is a Uint8Array, it * is treated as Big Endian data. Throws if the value is not safe.

(value)

Source from the content-addressed store, hash-verified

157 * is treated as Big Endian data. Throws if the value is not safe.
158 */
159function toNumber(value) {
160 return getNumber(toBigInt(value));
161}
162exports.toNumber = toNumber;
163/**
164 * Converts %%value%% to a Big Endian hexstring, optionally padded to

Callers

nothing calls this directly

Calls 2

getNumberFunction · 0.70
toBigIntFunction · 0.70

Tested by

no test coverage detected