@technobuddha/library
Version:
A large library of useful functions
13 lines (12 loc) • 366 B
TypeScript
export declare type Options = {
/** If true, trim */
trim?: boolean;
};
/**
* Replace all whitespace within a string with a single space
*
* @param input The string
* @param trim If true, remove leading and trailing whitespace
*/
export declare function collapseWhitespace(input: string, { trim }?: Options): string;
export default collapseWhitespace;