indent()function

indent(str: string): string
ParamType
strstring
The string to indent. required
Return
string
The indented string.

Indent a string for nested debug output.

  • Multiline strings are pushed onto a new line with a tab prepended to each line.
  • Single-line strings are simply prefixed with a space.

Examples

indent("a\nb") // `\na\n\tb`