mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
BREAKING(fmt): remove stripColor
(#5374)
This commit is contained in:
parent
0a8a3387c6
commit
d32a8c9c34
@ -979,25 +979,6 @@ const ANSI_PATTERN = new RegExp(
|
||||
"g",
|
||||
);
|
||||
|
||||
/**
|
||||
* Remove ANSI escape codes from the string.
|
||||
*
|
||||
* @example Usage
|
||||
* ```ts no-assert
|
||||
* import { stripColor, red } from "@std/fmt/colors";
|
||||
*
|
||||
* console.log(stripColor(red("Hello, world!")));
|
||||
* ```
|
||||
*
|
||||
* @param string The text to remove ANSI escape codes from
|
||||
* @returns The text without ANSI escape codes
|
||||
*
|
||||
* @deprecated This will be removed in 1.0.0. Use {@linkcode stripAnsiCode} instead.
|
||||
*/
|
||||
export function stripColor(string: string): string {
|
||||
return stripAnsiCode(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove ANSI escape codes from the string.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user