Skip to content

fundamentool


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 ​

ParameterTypeDescription
inputstringThe 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 ​

ParameterTypeDescription
inputanyThe array of values to stringify.

Returns ​

string

The stringified values.

MIT License