node-json-db
    Preparing search index...

    Serializer for JavaScript BigInt values. Serializes a BigInt as a string representation.

    { "__type": "BigInt", "__value": "9007199254740993" }
    

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    type: "BigInt"

    Unique type identifier stored as __type in the serialized JSON.

    Methods

    • Deserialize a value from its JSON representation. The input is the __value from the serialized JSON.

      Parameters

      • value: string

        The stored JSON value

      Returns bigint

      The deserialized runtime value

    • Serialize a value to a JSON-compatible representation. The returned value will be stored under __value in the serialized JSON.

      Parameters

      • value: bigint

        The value to serialize

      Returns string

      A JSON-compatible value

    • Test if a runtime value should be handled by this serializer.

      Parameters

      • value: any

        The value to test

      Returns boolean

      true if this serializer should handle this value