{"id":13454600,"url":"https://github.com/nodeca/unhomoglyph","last_synced_at":"2025-04-09T15:08:43.228Z","repository":{"id":57144675,"uuid":"76011034","full_name":"nodeca/unhomoglyph","owner":"nodeca","description":"Replace all homoglyphs with base characters. Useful to detect similar strings.","archived":false,"fork":false,"pushed_at":"2020-05-18T05:06:56.000Z","size":48,"stargazers_count":41,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T15:08:39.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodeca.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-09T07:10:24.000Z","updated_at":"2024-12-15T07:45:46.000Z","dependencies_parsed_at":"2022-09-05T10:01:34.578Z","dependency_job_id":null,"html_url":"https://github.com/nodeca/unhomoglyph","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeca%2Funhomoglyph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeca%2Funhomoglyph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeca%2Funhomoglyph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodeca%2Funhomoglyph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodeca","download_url":"https://codeload.github.com/nodeca/unhomoglyph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055282,"owners_count":21040157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T08:00:55.745Z","updated_at":"2025-04-09T15:08:43.206Z","avatar_url":"https://github.com/nodeca.png","language":"JavaScript","readme":"# unhomoglyph\n\n[![Build Status](https://img.shields.io/travis/nodeca/unhomoglyph/master.svg?style=flat)](https://travis-ci.org/nodeca/unhomoglyph)\n[![NPM version](https://img.shields.io/npm/v/unhomoglyph.svg?style=flat)](https://www.npmjs.org/package/unhomoglyph)\n\n\u003e Replace all homoglyphs with base characters. Useful to detect similar strings.\nFor example, to prohibit register similar looking nicknames at websites.\n\nData source - [Recommended confusable mapping for IDN](http://www.unicode.org/Public/security/latest/confusables.txt), v13.0.0.\n\n__Note!__ Text after transform is NOT intended be read by humans. For example,\n`m` will be transformed to `r` + `n`. Goal is to compare 2 strings after\ntransform, to check if sources looks similar or not. If sources look similar,\nthen transformed strings are equal.\n\n\n## Install\n\n```bash\nnpm install unhomoglyph --save\n```\n\n\n## Example\n\n```js\nconst unhomoglyph = require('unhomoglyph');\n\nconsole.log(unhomoglyph('AΑАᎪᗅᴀꓮ')); // =\u003e AAAAAAA\nconsole.log(unhomoglyph('m'));        // =\u003e rn (r + n)\n\n//\n// Compare nicknames\n//\n\nconst username1 = 'm';\nconst username2 = 'rn';\n\nif (unhomoglyph(username1) === unhomoglyph(username2)) {\n  console.log(`\"${username1}\" and \"${username2} look similar`);\n}\n```\n\n\n## Update\n\n```bash\nnpm run update\n```\n\n\n## License\n\n[MIT](https://github.com/nodeca/unhomoglyph/blob/master/LICENSE)\n","funding_links":[],"categories":["Packages","包","Repository","目录","JavaScript","Text"],"sub_categories":["Text","文本","Text/String","文本处理"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeca%2Funhomoglyph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodeca%2Funhomoglyph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodeca%2Funhomoglyph/lists"}