@bytebury/sauce - v1.4.0
    Preparing search index...

    Function stringify

    • Converts the given parameter into the string equivalent.

      If the thing provided has the type of "object", then this function returns JSON.stringify(thing). Otherwise, it will wrap the thing in a String and convert it to it's string representation.

      Type Parameters

      • T

      Parameters

      • thing: T

      Returns string

      stringify({ foo: "bar" }); // "{ "foo": "bar" }"
      stringify([1, 2, 3]); // "[1, 2, 3]"
      stringify(1); // "1"