import { InferCSVRecord, ParseBinaryOptions } from '../../../core/types'; /** * Parse a binary from a BufferSource. * * @category Middle-level API * * @param bytes CSV bytes to parse (BufferSource: Uint8Array, ArrayBuffer, or other TypedArray). * @param options Parsing options * @returns Async iterable iterator of records. * * @example Parsing CSV binary * * ```ts * import { parseBinary } from 'web-csv-toolbox'; * * const csv = Uint8Array.from([ * // ... * ]); * * for await (const record of parseBinary(csv)) { * console.log(record); * } * ``` */ export declare function parseBinary
, Options extends ParseBinaryOptions
= ParseBinaryOptions
>(bytes: BufferSource, options?: Options): AsyncIterableIterator>; export declare namespace parseBinary { /** * Parse a binary from a BufferSource to an array of records. * * @param bytes CSV bytes to parse (BufferSource: Uint8Array, ArrayBuffer, or other TypedArray). * @param options Parsing options * @returns Array of records * * @example * ```ts * import { parseBinary } from 'web-csv-toolbox'; * * const csv = Uint8Array.from([ * // ... * ]); * * const records = await parseBinary.toArray(csv); * ``` */ function toArray
, Options extends ParseBinaryOptions
= ParseBinaryOptions
>(bytes: BufferSource, options?: Options): Promise[]>; /** * Parse a binary from a BufferSource to an array of records. * * @param bytes CSV bytes to parse (BufferSource: Uint8Array, ArrayBuffer, or other TypedArray). * @param options Parsing options * @returns Array of records * @example * * ```ts * import { parseBinary } from 'web-csv-toolbox'; * * const csv = Uint8Array.from([ * // ... * ]); * * const records = parseBinary.toArraySync(csv); * ``` */ function toArraySync
, Options extends ParseBinaryOptions
= ParseBinaryOptions
>(bytes: BufferSource, options?: Options): InferCSVRecord[]; /** * Parse a binary from a BufferSource to an iterable iterator of records. * * @param bytes CSV bytes to parse (BufferSource: Uint8Array, ArrayBuffer, or other TypedArray). * @param options Parsing options * @returns Async iterable iterator of records. * @example * ```ts * import { parseBinary } from 'web-csv-toolbox'; * * const csv = Uint8Array.from([ * // ... * ]); * * for (const record of parseBinary.toIterableIterator(csv)) { * console.log(record); * } * ``` */ function toIterableIterator
, Options extends ParseBinaryOptions
= ParseBinaryOptions
>(bytes: BufferSource, options?: Options): IterableIterator>; /** * Parse a binary from a BufferSource to a stream of records. * * @param bytes CSV bytes to parse (BufferSource: Uint8Array, ArrayBuffer, or other TypedArray). * @param options Parsing options * @returns Stream of records. * * @example * * ```ts * import { parseBinary } from 'web-csv-toolbox'; * * const csv = Uint8Array.from([ * // ... * ]); * * const stream = parseBinary.toStream(csv); * * await stream.pipeTo( * new WritableStream({ * write(record) { * console.log(record); * }, * }), * ); * ``` */ function toStream
, Options extends ParseBinaryOptions
= ParseBinaryOptions
>(bytes: BufferSource, options?: Options): ReadableStream>; }