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

Function dataLength

lib.esm/utils/data.js:95–100  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

93 * Returns the length of %%data%%, in bytes.
94 */
95export function dataLength(data) {
96 if (isHexString(data, true)) {
97 return (data.length - 2) / 2;
98 }
99 return getBytes(data).length;
100}
101/**
102 * Returns a [[DataHexString]] by slicing %%data%% from the %%start%%
103 * offset to the %%end%% offset.

Callers 15

constructorMethod · 0.90
signMethod · 0.90
recoverPublicKeyMethod · 0.90
rMethod · 0.90
sMethod · 0.90
parseOffchainLookupFunction · 0.90
verifyFunction · 0.90
_packFunction · 0.90
rMethod · 0.90
sMethod · 0.90
constructorMethod · 0.90
signMethod · 0.90

Calls 2

isHexStringFunction · 0.70
getBytesFunction · 0.70

Tested by

no test coverage detected