Skip to content

The open alternative to Salesforce, designed for AI.

174 B
Raw Blame
const MULTIPLE_WHITESPACE_REGEX = /\s+/g;

export const trimAndRemoveDuplicatedWhitespacesFromString = (str: string) =>
  str.trim().replace(MULTIPLE_WHITESPACE_REGEX, ' ');