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

    Variable export=

    "export=": {
        DXNBytes: typeof export=;
        DXNChar: typeof export=;
        DXNCustomTag: typeof export=;
        DXNDate: typeof export=;
        DXNDateTime: typeof export=;
        DXNDecimal: typeof export=;
        DXNDuration: typeof export=;
        DXNKeyword: typeof export=;
        DXNList: typeof export=;
        DXNOrderedMap: typeof export=;
        DXNRational: typeof export=;
        DXNRegex: typeof export=;
        DXNSortedSet: typeof export=;
        DXNStruct: typeof export=;
        DXNSymbol: typeof export=;
        DXNTime: typeof export=;
        DXNTimestamp: typeof export=;
        DXNTuple: typeof export=;
        DXNURI: typeof export=;
        DXNUUID: typeof export=;
        KIND_RANK: Record<string, number>;
        canonicalKey(value: unknown): string;
        dxnCompare(a: unknown, b: unknown): -1 | 0 | 1;
        dxnEquals(a: unknown, b: unknown): boolean;
        kindOf(value: unknown): string;
    }

    Type Declaration

    • DXNBytes: typeof export=
    • DXNChar: typeof export=
    • DXNCustomTag: typeof export=
    • DXNDate: typeof export=
    • DXNDateTime: typeof export=
    • DXNDecimal: typeof export=
    • DXNDuration: typeof export=
    • DXNKeyword: typeof export=
    • DXNList: typeof export=
    • DXNOrderedMap: typeof export=
    • DXNRational: typeof export=
    • DXNRegex: typeof export=
    • DXNSortedSet: typeof export=
    • DXNStruct: typeof export=
    • DXNSymbol: typeof export=
    • DXNTime: typeof export=
    • DXNTimestamp: typeof export=
    • DXNTuple: typeof export=
    • DXNURI: typeof export=
    • DXNUUID: typeof export=
    • KIND_RANK: Record<string, number>
    • canonicalKey: function
      • A stable string encoding of a DXN value, equal for and only for dxnEquals-equal values. Used internally for structural dedup/sort (e.g. DXNSortedSet's uniqueness invariant) and as a deterministic tiebreaker for kinds with no natural element order (map/set).

        Parameters

        • value: unknown

        Returns string

    • dxnCompare: function
      • Total order over DXN values. Cross-kind comparisons fall back to KIND_RANK (this library's own implementation-defined choice, see module doc); same-kind comparisons use each kind's natural order.

        Parameters

        • a: unknown
        • b: unknown

        Returns -1 | 0 | 1

    • dxnEquals: function
      • Structural equality between two DXN values, recursing into every collection/wrapper shape. Two NaN floats are equal (DXN treats NaN as one specific scalar value, not "incomparable" the way IEEE 754 === does).

        Parameters

        • a: unknown
        • b: unknown

        Returns boolean

    • kindOf: function
      • Identifies the DXN "kind" of a value for cross-type ranking and same-kind dispatch. Native JS shapes are recognized directly; DXN* wrapper instances are recognized via their shared dxnType prototype tag.

        Parameters

        • value: unknown

        Returns string

    Barrel module for the DXN value model — every wrapper class plus the shared equality/ordering kernel, and the closed DXNValue type union documenting every shape a decoded DXN value can take. Mirrors Dextrin.Value's own moduledoc structure: one JS shape per DXN type, preferring a native value and falling back to a DXN* wrapper only where nothing native fits without losing information (see each class's own JSDoc for why).

    Two shapes are worth calling out here, the same way Dextrin.Value calls out its own non-obvious ones:

    • integer is always BigInt, never number — the one place fidelity to Elixir's arbitrary-precision guarantee requires not picking the closest-looking native type.
    • float is a plain number, including NaN/Infinity/ -Infinity — unlike Elixir, which needs atoms for those three because the BEAM can't construct a non-finite float term. JS number natively holds all of IEEE-754, so no wrapper is needed here at all; this is a case where JS's native type is a better fit than Elixir's own.

    Map/Set are typed <unknown, unknown>/<unknown> rather than <DXNValue, DXNValue>/<DXNValue> — TS's JSDoc @typedef circularity checker tolerates self-reference through a plain array/union position (DXNValue[], below) but not through a generic type argument; this is a checker limitation, not a real type-precision loss anyone should try to "fix" back.