CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
index.d.ts34 linesDownload Raw Back to ansi-regex
1export type Options = {2	/**3	Match only the first ANSI escape.4 5	@default false6	*/7	readonly onlyFirst: boolean;8};9 10/**11Regular expression for matching ANSI escape codes.12 13@example14```15import ansiRegex from 'ansi-regex';16 17ansiRegex().test('\u001B[4mcake\u001B[0m');18//=> true19 20ansiRegex().test('cake');21//=> false22 23'\u001B[4mcake\u001B[0m'.match(ansiRegex());24//=> ['\u001B[4m', '\u001B[0m']25 26'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true}));27//=> ['\u001B[4m']28 29'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex());30//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007']31```32*/33export default function ansiRegex(options?: Options): RegExp;34 
basant307/AI_Governance_Project · CoolFace