MCPcopy Create free account
hub / github.com/bitpay/bitcore / jsonParseWithBuffer

Method jsonParseWithBuffer

packages/bitcore-cli/src/utils.ts:359–366  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

357 }
358
359 static jsonParseWithBuffer(data: string) {
360 return JSON.parse(data, (key, value) => {
361 if (value && value.type === 'Buffer') {
362 return Buffer.from(value.data);
363 }
364 return value;
365 });
366 }
367
368 static compactString(str: string, length: number = 19) {
369 if (length < 5) {

Callers 3

utils.test.tsFile · 0.80
importMethod · 0.80
loadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected