Skip to main content
Module

x/xml/utils/stream.ts>Stream

📑 A XML parser/stringifier for Deno written in typescript and with no dependencies
Very Popular
Go to Latest
class Stream
import { Stream } from "https://deno.land/x/xml@2.1.1/utils/stream.ts";

Text stream helper

Constructors

new
Stream(content: Flux)

Constructor

Properties

readonly
cursor

Cursor position

Methods

capture(unnamed 0: { until: RegExp; bytes: number; trim?: boolean; length?: number; })

Capture next bytes until matching regex sequence (length can be used for regex with lookbehind)

consume(unnamed 0: { content: string; trim?: boolean; })

Consume next bytes ensuring that content is matching

peek(bytes?, offset?)

Peek next bytes (cursor is replaced at current position after reading)

read(bytes?)

Read next bytes (cursor is moved after reading)

Trim content