mirror of
https://github.com/litruv/unhomoglyph.git
synced 2026-07-24 02:36:12 +10:00
37 lines
780 B
Markdown
37 lines
780 B
Markdown
# unhomoglyph
|
||
|
||
[](https://travis-ci.org/nodeca/unhomoglyph)
|
||
[](https://www.npmjs.org/package/unhomoglyph)
|
||
|
||
> Replace all homoglyphs with base characters. Useful to detect similar strings.
|
||
|
||
Data source - [Recommended confusable mapping for IDN](http://www.unicode.org/Public/security/latest/confusables.txt), v9.0.0.
|
||
|
||
|
||
## Install
|
||
|
||
```bash
|
||
npm install unhomoglyph --save
|
||
```
|
||
|
||
|
||
## Example
|
||
|
||
```js
|
||
const unhomoglyph = require('unhomoglyph');
|
||
|
||
console.log(unhomoglyph('AΑАᎪᗅᴀꓮ')); // => AAAAAAA
|
||
```
|
||
|
||
|
||
## Update
|
||
|
||
```bash
|
||
npm run update
|
||
```
|
||
|
||
|
||
## License
|
||
|
||
[MIT](https://github.com/nodeca/unhomoglyph/blob/master/LICENSE)
|