Improve example

This commit is contained in:
Vitaly Puzrin
2017-04-09 14:23:14 +03:00
committed by GitHub
parent 77448891d7
commit fed5576b38

View File

@@ -28,6 +28,17 @@ const unhomoglyph = require('unhomoglyph');
console.log(unhomoglyph('AΑА')); // => AAAAAAA
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`);
}
```