We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bulkReplace
The bulk-replace package creates a new RegExp every time if one is not provided. Providing a regex offers a significant performance boost.
bulk-replace
// Initial transliteration // str = bulkReplace(str, /[ヲ-ン][゙゚]/g, katakanaHalfwidthsCombined); // str = bulkReplace(str, /[ヲ-ン]/g, katakanaHalfwidths); str = bulkReplace(str, /[ぁ-ゖゟ][ぁぃぅぇぉゃゅょ]/g, hiraganaDigraphs); str = bulkReplace(str, /[ァ-ヺー][ァィゥェォャュョ]/g, katakanaDigraphs); str = bulkReplace(str, /[ぁ-ゖゟ]/g, hiraganaMonographs); str = bulkReplace(str, /[ァ-ヺー]/g, katakanaMonographs);
JSPerf: https://jsperf.com/katakana-monographs
The text was updated successfully, but these errors were encountered:
Happy to accept a PR if you're able.
Sorry, something went wrong.
v1.2.1
Successfully merging a pull request may close this issue.
The
bulk-replace
package creates a new RegExp every time if one is not provided. Providing a regex offers a significant performance boost.JSPerf: https://jsperf.com/katakana-monographs
The text was updated successfully, but these errors were encountered: