1 | import { ANSI_G, ASTRAL_G, ANSI, ASTRAL } from '@spare/regex-charset';
|
2 |
|
3 | const clearAnsi = tx => tx.replace(ANSI_G, '');
|
4 |
|
5 | const clearAstral = tx => tx.replace(ASTRAL_G, '_');
|
6 |
|
7 | const hasAnsi = tx => ANSI.test(tx);
|
8 |
|
9 | const hasAstral = tx => ASTRAL.test(tx);
|
10 |
|
11 | export { clearAnsi, clearAstral, hasAnsi, hasAstral };
|