The asString() method returns a string representing the value by explicitly using String(value).

0.4.3

const arr = [ 1, 2, 3];
asString(arr); // "1,2,3"
asString(null); // "null"
asString(undefined); // "undefined"
asString(42); // "42"
asString(Symbol.for("Hello")); // "Symbol(Hello)"
  • Parameters

    • value: any

      The value to get a string representation of

    Returns string