Commented

Commented

Generate the expanded format of RFC 8949, section 3.2.2.

Constructor

new Commented(optionsopt)

Description:
  • Create a CBOR commenter.
Source:
Parameters:
Name Type Attributes Default Description
options CommentOptions <optional>
{} Stream options.

Extends

  • stream.Transform

Methods

(static) comment(input, optionsopt, cbopt) → {Promise}

Description:
  • Comment on an input Buffer or string, creating a string passed to the callback. If callback not specified, a promise is returned.
Source:
Parameters:
Name Type Attributes Default Description
input string | Buffer | ArrayBuffer | Uint8Array | Uint8ClampedArray | DataView | stream.Readable Something to parse.
options CommentOptions | commentCallback | string | number <optional>
{} Encoding, max_depth, or callback.
cb commentCallback <optional>
null If specified, called on completion.
Throws:
Input required.
Type
Error
Returns:
If cb not specified.
Type
Promise