https://github.com/user-attachments/assets/3bea63cc-b098-4252-8787-fc6263f01e8d Closes #12277 --------- Co-authored-by: prastoin <paul@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
5 lines
174 B
TypeScript
5 lines
174 B
TypeScript
const MULTIPLE_WHITESPACE_REGEX = /\s+/g;
|
|
|
|
export const trimAndRemoveDuplicatedWhitespacesFromString = (str: string) =>
|
|
str.trim().replace(MULTIPLE_WHITESPACE_REGEX, ' ');
|