node-dextrin - v0.1.0
    Preparing search index...

    Class export=

    One error type for every dextrin failure mode — text-parse, printing, and (in later phases) binary/schema failures alike — mirroring Dextrin.Error's "a caller never has to special-case which pipeline produced it" role.

    API-shape divergence from Elixir, deliberate: Dextrin's own functions return {:ok, _} | {:error, %Dextrin.Error{}} tuples, idiomatic in an Elixir/with-based codebase. node-dextrin throws DXNError instead — idiomatic JS/Node (same convention JSON.parse, most YAML/TOML parsers, etc. already use), not a value-representation choice the "mirror Elixir's shape" goal this project otherwise follows was ever about. A non-throwing variant can be layered on top later if needed; throwing is the default.

    Hierarchy

    • Error
      • export=
    Index
    • Parameters

      • message: string
      • Optionaldetails: { cause?: unknown; offset?: number; stage?: string } = {}

      Returns export=

    name: string
    offset: number | undefined
    stage: string
    • Wraps any thrown error from the text/binary pipelines into a DXNError, preserving a lexer/parser's own offset when present and passing everything else through as cause — so callers only ever need to catch one error type from decode/encode.

      Parameters

      • err: unknown
      • stage: string

      Returns export=