1.0.0 • Published 2 years ago
jees-ansi-length v1.0.0
ANSI string length ✨
Determine the true length of a string by accurately accounting for astral symbols while disregarding ANSI escape codes. ✨
Install
npm i jees-ansi-length # 📥 installimport length from 'jees-ansi-length'; // 📦 importSyntax
const result = length(text); /* ✨ have fun ✨ */Example
length('\u001B[31mPlain !\u001B[0m'); // => 7 length('\u001B[31mPlain !\u001B[0m', true); // => 9 (16 - 7)
Documents
API
This package is part of the
jeesframework.
Made with ❤ by Maysara Elshewehy
1.0.0
2 years ago