@technobuddha/library
Version: 
A large library of useful functions
24 lines (23 loc) • 729 B
TypeScript
/**
 * Options for stripping unwanted characters or sequences from strings.
 * @group String
 * @category Operations
 */
export type StripOptions = {
    /**
     * If true, ANSI escape codes will be removed from the string.
     */
    ansiEscape?: boolean;
};
/**
 * Removes unwanted sequences from the input string.
 *
 * By default, this function strips ANSI escape codes from the input string.
 *
 * @param input - The string to be processed.
 * @param options - Options to control what is stripped.  see {@link StripOptions}.
 * @returns The processed string with specified sequences removed.
 * @group String
 * @category Operations
 */
export declare function strip(input: string, { ansiEscape }?: StripOptions): string;