@technobuddha/library
Version:
A large library of useful functions
18 lines (17 loc) • 576 B
TypeScript
/**
* Options for the {@link collapseBreakingSpace} function
* @group String
* @category Operations
*/
export type CollapseBreakingSpaceOptions = {
/** If true, trim leading and trailing whitespace */
trim?: boolean;
};
/**
* Replace all breaking space (space, tab, carriage return, new line) with a single space
* @param input - The string
* @param trim - If true, remove leading and trailing whitespace
* @group String
* @category Operations
*/
export declare function collapseBreakingSpace(input: string, { trim }?: CollapseBreakingSpaceOptions): string;