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

    Parameters

    • value: any

      The value to get a string representation of

    Returns string

    Since

    0.4.3

    Example

    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)"