Commented

Commented

Generate the expanded format of RFC 7049, section 2.2.1

Constructor

new Commented(optionsopt)

Create a CBOR commenter.
Source:
Parameters:
Name Type Attributes Default Description
options any <optional>
{} Stream options
Name Type Attributes Default Description
max_depth bool <optional>
10 how many times to indent the dashes

Extends

  • stream.Transform

Methods

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

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 Description
input string | Buffer | NoFilter
options string | Object | function
Name Type Attributes Default Description
max_depth number <optional>
10 how many times to indent the dashes
cb commentCallback <optional>
Returns:
Type:
Promise
if cb not specified