Options
All
  • Public
  • Public/Protected
  • All
Menu

Simple utility to easily walk over string data one character at a time.

Hierarchy

  • Walker

Index

Properties

Methods

Properties

Private data

data: string = ""

Private idx

idx: number = 0

Private length

length: number = 0

Methods

consume

  • consume(stop: string | Set<string>, ...args: string[]): string
  • Consume all characters that do not match the provided Set or strings and return the discovered value.

    Parameters

    • stop: string | Set<string>

      A Set of strings, or arguments list of strings, that will halt character ingestion.

    • Rest ...args: string[]

    Returns string

index

  • index(): number

init

  • init(data: string): void

next

  • next(): string

peek

  • peek(): string

Generated using TypeDoc