@alextheman/utility - v4.3.5
    Preparing search index...

    Function normaliseIndents

    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:

    normaliseIndents`Template string here
    with a new line
    and another new line`.

    You may also pass the options first, then invoke the resulting function with a template string:

    normaliseIndents({ preserveTabs: false })`Template string here
    with a new line
    and another new line`.

    The strings from the template to process, or the options to apply.

    An array of all interpolations from the template.

    An additional function to invoke, or a new string with the strings and interpolations from the template applied, and extraneous indents removed.

    • Provides a new function that removes any extraneous indents from a multi-line template string, with the given options applied.

      Parameters

      Returns NormaliseIndentsFunction

      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`.

      Parameters

      • strings: TemplateStringsArray

        The strings from the template to process.

      • ...interpolations: unknown[]

        An array of all interpolations from the template.

      Returns string

      A new string with the strings and interpolations from the template applied, and extraneous indents removed.