Convert Unicode characters to Latin characters using transliteration
by sindresorhusJavaScript
Last 12 weeks · 0 commits
4 of 6 standards met
I wanted to use Swedish replacements (actually Finnish, but for my purposes they are the same thing) and struggled for awhile, because I couldn't understand how to get them to work. In the end I commented out Latin and English, which conflicted with Swedish/Finnish. If this is the intended way to change the transliteration, I would suggest adding "disabled (commented out) by default in " to the supported languages list in the readme. I could do this if the issue is this straightforward.
#40 was a valid recommendation, but unfortunately, it only works if all used patterns can be cached. The current implementation from 268a2cd9fa0566caed6bdfa5ba5512f41180ebfe makes the default case faster, but as soon as the or are passed, it's much slower than the previous version (it doubled the CPU usage of the service where we use this package). This can be checked easily by adding e.g. to the existing test, which makes it about 5x slower: Alternatively, to avoid breaking changes, the original approach could be used in case custom options are passed.
Repository: sindresorhus/transliterate. Description: Convert Unicode characters to Latin characters using transliteration Stars: 316, Forks: 25. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Topics: deburr, latinization, node-module, npm-package, string-conversion, transliteration, unicode, unicode-converter. Latest release: v2.3.1 (5mo ago). Open PRs: 1, open issues: 1. Last activity: 5mo ago. Community health: 85%. Top contributors: sindresorhus, Richienb, AlexxNB, yhdgms1, dersimoezdag, hay, rhnorskov, silvandiepen, vhpoet.