Indents the input string x tabs (except for the first line by default).
Useful for pretty printing objects inside template strings (which is why first = false by default). The count should be set for the literal amount of strings the code is indented at.
constobj = {a:"a", b:"b", c:"c"}
functionsomeFunc() { constmessage = format(` Some message: ${indent(pretty(obj), 2)} `)
^thecodeisindented2tabs, sothat's what the count should be Produces: Somemessage: { a: "a", b: "b", c:"c" }
constmessage2 = format(` Some message: ${indent(pretty(obj), 2)} `)
Indents the input string x tabs (except for the first line by default).
Useful for pretty printing objects inside template strings (which is why
first = false
by default). The count should be set for the literal amount of strings the code is indented at.