Library API
    Preparing search index...

    Function asString

    • Coerces a value to a string using serialization if it is not nullish.

      Type Parameters

      • T

      Parameters

      • Optionalstr: T

        The value to coerce to a string

      Returns string

      The stringified value, or an empty string if nullish

      const str = asString({ a: 1 }); // '{"a":1}'