Format CBOR value as diagnostic notation with options.
CBOR value to format
Optional
Formatting options
Diagnostic string
const value = cbor({ name: 'Alice', age: 30 });console.log(diagnosticOpt(value, { flat: true }));// {\"name\": \"Alice\", \"age\": 30}const tagged = createTaggedCbor({ ... });console.log(diagnosticOpt(tagged, { annotate: true }));// date(1234567890) Copy
const value = cbor({ name: 'Alice', age: 30 });console.log(diagnosticOpt(value, { flat: true }));// {\"name\": \"Alice\", \"age\": 30}const tagged = createTaggedCbor({ ... });console.log(diagnosticOpt(tagged, { annotate: true }));// date(1234567890)
Format CBOR value as diagnostic notation with options.