MCPcopy Create free account
hub / github.com/CommE2E/comm / convertBytesToObj

Function convertBytesToObj

lib/utils/conversion-utils.js:206–209  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

204// NOTE: This function should not be called from native. On native, we should
205// use `convertBytesToObj` in native/backup/conversion-utils.js instead.
206function convertBytesToObj<T>(bytes: Uint8Array): T {
207 const str = new TextDecoder().decode(bytes.buffer);
208 return JSON.parse(str);
209}
210
211export {
212 convertClientIDsToServerIDs,

Callers 3

tunnelbroker.jsFile · 0.90

Calls 2

decodeMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected