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

Function dataLength

lib.commonjs/utils/data.js:104–109  ·  view source on GitHub ↗

* Returns the length of %%data%%, in bytes.

(data)

Source from the content-addressed store, hash-verified

102 * Returns the length of %%data%%, in bytes.
103 */
104function dataLength(data) {
105 if (isHexString(data, true)) {
106 return (data.length - 2) / 2;
107 }
108 return getBytes(data).length;
109}
110exports.dataLength = dataLength;
111/**
112 * Returns a [[DataHexString]] by slicing %%data%% from the %%start%%

Callers

nothing calls this directly

Calls 2

isHexStringFunction · 0.70
getBytesFunction · 0.70

Tested by

no test coverage detected