ConstProvides a new function that removes any extraneous indents from a multi-line template string, with the given options applied.
The options to apply.
A function that takes a template string, and returns a new string with the strings and interpolations from the template applied, and extraneous indents removed.
Removes any extraneous indents from a multi-line template string.
You can pass a template string directly by doing:
normaliseIndents`Template string here
with a new line
and another new line`.
The strings from the template to process.
An array of all interpolations from the template.
A new string with the strings and interpolations from the template applied, and extraneous indents removed.
Applies any options if provided, then removes any extraneous indents from a multi-line template string.
You can pass a template string directly by doing:
You may also pass the options first, then invoke the resulting function with a template string: