Constructor
new Commented(optionsopt)
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}
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:
- Type:
-
Promise
If cb not specified.