const compactWhitespace = (str: string) => str.replace(/\s{2,}/g, ' ');
      
      Typescript language logo

      Compact whitespace

      Codiga's TypeScript Recipes

      Compacts whitespaces in a string.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.