Library API
    Preparing search index...

    Function stringify

    • Serializes objects for string-safe stashing in WebStorage, Cache, etc. Uses JSON.stringify where available, else returns a stringified single key:value object (e.g., { "$BigInt": "123" }) for custom types.

      Type Parameters

      • T

      Parameters

      • obj: T

        The object to stringify

      Returns string

      The safely stringified representation

      stringify(123n); // '{"$BigInt":"123"}'