Function encodeEscapedWrapped

  • This function:

    1. Keeps regular spaces, only ' ', as they are.
    2. Converts \n \r \t to escaped versions, \\n \\r and \\t.
    3. Converts other control characters to their Unicode escape sequences.
    4. Converts ' " to escaped versions, \\\\' \\\\ and \\"
    5. Wraps the whole thing in "" if any characters have been encoded.

    Parameters

    • str: string

    Returns string

Generated using TypeDoc