Appearance
jsonl
Variables
Decoder
ts
const Decoder: ILineDecoderConstructor<any>;Defined in: src/jsonl/Decoder.ts:10
JSONL line decoder — a LineDecoder pre-configured with JSON.parse.
Example
ts
const decoder = new Decoder();
decoder.push(Buffer.from('{"a":1}\n{"b":2}\n'));parse
ts
parse: (input) => any;Defined in: src/jsonl/base.ts:11
Parses a string into an array of values.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | string | The string to parse. |
Returns
any
The array of values.
stringify
ts
stringify: (input) => string;Defined in: src/jsonl/base.ts:12
Stringifies an array of values into a string.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | any | The array of values to stringify. |
Returns
string
The stringified values.