Unicode flag breaking older browsers
charlesLoder opened this issue · 0 comments
charlesLoder commented
Since the Hebrew characters are not a part of the astral plane the u
flag is not really necessary.
// remove.js
// line 11
module.exports = (text, options = {removeVowels: false}) => !options.removeVowels ? text.replace(/[\u0591-\u05F4, \uFB1D-\uFB4F]/gu, i => hebCharsRC[i]) : text.replace(/[\u0591-\u05F4, \uFB1D-\uFB4F]/gu, i => hebCharsRV[i]);
Probably need to redo in the manner of titForTas.js
:
module.exports = text => [...text].map(char => char in hebChars ? hebChars[char] : char)
.reduce((a, c) => a + c)