Private constructorStatic dedentDedent a template literal with an auto-determined number of tabs.
Remove up to n number of tabs from the beginning of each literal line in the template literal.
Does not affect interpolated expressions.
n is determined by the number of tabs following the first line break in the literal.
If there are no line breaks, 0 is assumed.
Rest ...interps: unknown[]a string with each line dedented by the determined number of tabs
assert.strictEqual(dedent`
this will be
dedented by
up to
3 tabs
`, `
this will be
dedented by
up to
3 tabs
`);
Static stringifyConvert a thing into a string.
If the argument is an array, it is joined.
If it is an object, JSON.stringify is called on it.
This method calls .toString() on everything else, except null and undefined,
which are converted to the strings 'null' and 'undefined' respectively.
Useful for JSON objects where the value could be a single string or an array of strings.
anything to convert
a string version of the argument
Additional static members for the native String class.
Does not extend the native String class.