Commented

Commented

Generate the expanded format of RFC 7049, section 2.2.1

Constructor

new Commented(optionsopt)

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

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