@jiminp/tooltool
    Preparing search index...

    Function trimIndented

    • Trim begin and end of text, and also remove all indentations.

      Parameters

      • text: string

        The text to trim.

      Returns string

      The trimmed and de-indented text.

      const text = `
      Hello,
      world!
      `;
      const trimmed = trimIndented(text);
      // trimmed === "Hello,\nworld!"