Skip to content

Instantly share code, notes, and snippets.

@thecotne
Last active June 15, 2020 21:01
Show Gist options
  • Save thecotne/46656b2192cbaf307be8ea4950b85816 to your computer and use it in GitHub Desktop.
Save thecotne/46656b2192cbaf307be8ea4950b85816 to your computer and use it in GitHub Desktop.
toUpperCase without fucking georgian text
function toUpperCase (text) {
return Array.prototype.map.call(text, char => /[ა-ჰ]/.test(char) ? char : char.toUpperCase()).join('')
}
const toUpperCase = R.pipe(
R.map(R.ifElse(R.test(/[ა-ჰ]/), R.identity, R.toUpper)),
R.join('')
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment