unhomoglyph alternatives and similar modules
Based on the "Text" category.
Alternatively, view unhomoglyph alternatives based on common mentions on social networks and blogs.
-
nanoid
A tiny (130 bytes), secure, URL-friendly, unique string ID generator for JavaScript -
Numeral.js
A javascript library for formatting and manipulating numbers. -
Flexsearch
Next-Generation full text search library for Browser and Node.js -
Underscore.string
String manipulation helpers for javascript -
i18n-node
Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates. -
StegCloak
Hide secrets with invisible characters in plain text securely using passwords 🧙🏻♂️⭐ -
camelcase
Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar -
babelfish
human friendly i18n for javascript (node.js + browser) -
string-length
Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes -
strip-indent
Strip leading whitespace from each line in a string -
parse-columns
Parse text columns, like the output of unix commands -
splice-string
Remove or replace part of a string like Array#splice -
hanging-indent
format a string into a hanging indent with Node.js
Appwrite - The Open Source Firebase alternative introduces iOS support
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of unhomoglyph or a related project?
README
unhomoglyph
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, v13.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)
//
// Compare nicknames
//
const username1 = 'm';
const username2 = 'rn';
if (unhomoglyph(username1) === unhomoglyph(username2)) {
console.log(`"${username1}" and "${username2} look similar`);
}
Update
npm run update
License
*Note that all licence references and agreements mentioned in the unhomoglyph README section above
are relevant to that project's source code only.