Prelude API
    Preparing search index...

    Function indent

    • Adds indentation to all lines of a string, including the first line.

      Parameters

      • input: string
      • indentation: string = ' '

        The indentation string to add (default: two spaces)

      Returns string

      A new string with all lines indented

      indent('hello\nworld') // '  hello\n  world'