Ndjson overview
Added in v1.0.0
Table of contents
combinators
duplex
Signature
export declare const duplex: any
Added in v1.0.0
duplexSchema
Signature
export declare const duplexSchema: any
Added in v1.0.0
constructors
pack
Signature
export declare const pack: <IE = never, Done = unknown>() => Channel.Channel<
Chunk.Chunk<Uint8Array>,
Chunk.Chunk<unknown>,
IE | NdjsonError,
IE,
Done,
Done
>
Added in v1.0.0
packSchema
Signature
export declare const packSchema: <A, I, R>(
schema: Schema.Schema<A, I, R>
) => <IE = never, Done = unknown>() => Channel.Channel<Chunk.Chunk<Uint8Array>, Chunk.Chunk<A>, any, IE, Done, Done, R>
Added in v1.0.0
unpack
Signature
export declare const unpack: <IE = never, Done = unknown>(
options?: NdjsonOptions
) => Channel.Channel<Chunk.Chunk<unknown>, Chunk.Chunk<Uint8Array>, NdjsonError | IE, IE, Done, Done>
Added in v1.0.0
unpackSchema
Signature
export declare const unpackSchema: <A, I, R>(
schema: Schema.Schema<A, I, R>
) => <IE = never, Done = unknown>(
options?: NdjsonOptions
) => Channel.Channel<Chunk.Chunk<A>, Chunk.Chunk<Uint8Array>, any, IE, Done, Done, R>
Added in v1.0.0
errors
NdjsonError (class)
Signature
export declare class NdjsonError
Added in v1.0.0
models
NdjsonOptions (interface)
Represents a set of options which can be used to control how the newline delimited JSON is handled.
Signature
export interface NdjsonOptions {
/**
* Whether or not the newline delimited JSON parser should ignore empty lines.
*
* Defaults to `false`.
*
* From the [newline delimited JSON spec](https://github.com/ndjson/ndjson-spec):
* ```text
* The parser MAY silently ignore empty lines, e.g. \n\n. This behavior MUST
* be documented and SHOULD be configurable by the user of the parser.
* ```
*
* @since 1.0.0
*/
readonly ignoreEmptyLines?: boolean
}
Added in v1.0.0
type ids
NdjsonErrorTypeId
Signature
export declare const NdjsonErrorTypeId: typeof NdjsonErrorTypeId
Added in v1.0.0
NdjsonErrorTypeId (type alias)
Signature
export type NdjsonErrorTypeId = typeof NdjsonErrorTypeId
Added in v1.0.0