1 | import { ANSI_G, ASTRAL_G } from '@texting/regex-charset';
|
2 |
|
3 | /**
|
4 | *
|
5 | * @param {string} tx
|
6 | * @returns {number}
|
7 | */
|
8 |
|
9 | const lange = tx => tx.replace(ANSI_G, '').replace(ASTRAL_G, '_').length;
|
10 | const Lange = ansi => ansi ? lange : x => x.length;
|
11 |
|
12 | export { Lange, lange };
|