From fed5576b38863d75cdc16414c2fa61d9f9f28442 Mon Sep 17 00:00:00 2001 From: Vitaly Puzrin Date: Sun, 9 Apr 2017 14:23:14 +0300 Subject: [PATCH] Improve example --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 0422182..1bd6d63 100644 --- a/README.md +++ b/README.md @@ -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`); +} ```