chore: init monorepo

This commit is contained in:
2025-06-21 12:42:09 +03:00
commit 1874ae3ac1
103 changed files with 23946 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
const converter = {
'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd',
'е': 'e', 'ё': 'e', 'ж': 'zh', 'з': 'z', 'и': 'i',
'й': 'y', 'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n',
'о': 'o', 'п': 'p', 'р': 'r', 'с': 's', 'т': 't',
'у': 'u', 'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch',
'ш': 'sh', 'щ': 'sch', 'ь': '', 'ы': 'y', 'ъ': '',
'э': 'e', 'ю': 'yu', 'я': 'ya', ' ': "_",
};
// TODO: if language not cyrillic or latin (ex chinese), may cause errors, but mne pofig
export function translit(word){
return word.toLowerCase().split("").map(letter => converter[letter] === undefined ? letter : converter[letter]).join("")
}