mirror of
https://github.com/litruv/unhomoglyph.git
synced 2026-07-26 03:36:14 +10:00
Improve example
This commit is contained in:
11
README.md
11
README.md
@@ -28,6 +28,17 @@ const unhomoglyph = require('unhomoglyph');
|
|||||||
|
|
||||||
console.log(unhomoglyph('AΑАᎪᗅᴀꓮ')); // => AAAAAAA
|
console.log(unhomoglyph('AΑАᎪᗅᴀꓮ')); // => AAAAAAA
|
||||||
console.log(unhomoglyph('m')); // => rn (r + n)
|
console.log(unhomoglyph('m')); // => rn (r + n)
|
||||||
|
|
||||||
|
//
|
||||||
|
// Compare nicknames
|
||||||
|
//
|
||||||
|
|
||||||
|
const username1 = 'm';
|
||||||
|
const username2 = 'rn';
|
||||||
|
|
||||||
|
if (unhomoglyph(username1) === unhomoglyph(username2)) {
|
||||||
|
console.log(`"${username1}" and "${username2} look similar`);
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user