Function escapeJsString

  • Escapes a string to be included into JavaScript string literal.

    Handles all kinds of quotes (', ", and ```) and special chars. Converts non-ASCII chars to corresponding Unicode escapes.

    Parameters

    • value: string

      A string to escape.

    Returns string

    Escaped string.

Generated using TypeDoc