2017-03-05 06:06:21 +03:00
2016-12-09 12:28:08 +03:00
2016-12-09 12:28:08 +03:00
2016-12-09 12:28:08 +03:00
2016-12-09 12:28:08 +03:00
2017-03-05 05:16:50 +03:00
2017-03-05 05:16:50 +03:00
2016-12-09 12:28:08 +03:00
2016-12-09 12:28:08 +03:00
2017-03-05 05:21:05 +03:00
2017-03-05 06:06:21 +03:00
2016-12-09 12:28:08 +03:00
2016-12-09 12:28:08 +03:00

unhomoglyph

Build Status NPM version

Replace all homoglyphs with base characters. Useful to detect similar strings. For example, to prohibit register similar looking nicknames at websites.

Data source - Recommended confusable mapping for IDN, v9.0.0.

Note! Text after transform is NOT intended be read by humans. For example, m will be transformed to r + n. Goal is to compare 2 strings after transform, to check if sources looks similar or not. If sources look similar, then transformed strings are equal.

Install

npm install unhomoglyph --save

Example

const unhomoglyph = require('unhomoglyph');

console.log(unhomoglyph('AΑА')); // => AAAAAAA
console.log(unhomoglyph('m'));        // => rn (r + n)

Update

npm run update

License

MIT

Description
No description provided
Readme MIT 212 KiB
Languages
JavaScript 100%