This commit is contained in:
unfunny
2026-09-12 23:57:45 -04:00
parent 986c0af682
commit dfe4cc537f
1775 changed files with 246421 additions and 0 deletions

20
node_modules/unhomoglyph/index.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
'use strict';
var data = require('./data.json');
function escapeRegexp(str) {
return str.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
}
var REPLACE_RE = RegExp(Object.keys(data).map(escapeRegexp).join('|'), 'g');
function replace_fn(match) {
return data[match];
}
function unhomoglyph(str) {
return str.replace(REPLACE_RE, replace_fn);
}
module.exports = unhomoglyph;