Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/openai/internal/decoders/line.ts>LineDecoder

Deno build of the official Typescript library for the OpenAI API.
Extremely Popular
Latest
class LineDecoder
import { LineDecoder } from "https://deno.land/x/openai@v4.68.0/internal/decoders/line.ts";

A re-implementation of httpx's LineDecoder in Python that handles incrementally reading lines from text.

https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258

Constructors

new
LineDecoder()

Properties

buffer: string[]
textDecoder: any
trailingCR: boolean

Methods

decode(chunk: Bytes): string[]
decodeText(bytes: Bytes): string
flush(): string[]

Static Properties

NEWLINE_CHARS: Set
NEWLINE_REGEXP: RegExp