UNPKG

condense-whitespace

Version:

Remove leading, trailing, and repeated whitespace from a string

13 lines (10 loc) 274 B
/** Remove leading, trailing, and repeated whitespace from a string. @example ``` import condenseWhitespace from 'condense-whitespace'; condenseWhitespace(' foo bar baz '); //=> 'foo bar baz' ``` */ export default function condenseWhitespace(string: string): string;