debugString()function

debugString(value: string): string
ParamType
valuestring
The string to debug. required
Return
string
The quoted and escaped string.

Convert a string into a quoted, escaped debug string.

  • Wraps the value in double quotes and escapes control characters, quotes, and backslashes.

Examples

debugString("a\tb") // `"a\\tb"`