CLJS outputs valid ES3 code, but string.prototype.normalizer is API, and
can be added with a polyfill. That said, I don't really like code that
depends on polyfills to function, so another solution would be preferred,
especially since ES6 isn't that supported yet.
søndag 21. juni 2015 17.23.37
I'm not sure I agree that it would make sense, in general, for "WEISS" and
"weiß" to be considered equal when ignoring case. I don't write any
german, so I might be wrong on that, though. Thankfully I didn't have to
write my own case-insensitive string comparison code because Oracle already
p
I thought about writing a cljs port, but I don't write much cljs so I
thought better of it. Software quality usually suffers when it isn't used
by the author, I think.
I'd love to find a collaborator to work on the cljs port of this library.
ES6 actually adds string.prototype.normalizer but II
The troubling thing isn't the use of Normalizer to remove accents, but the
use of .toUpper, .toLower, and .equalsIgnoreCase instead of Normalizer,
which may run into problems. For example you probably want "weiß" and
"WEISS" to compare equal when ignoring case. For a case-insensitive
comparison
Do you know about cuerdas? https://github.com/funcool/cuerdas
It is already compatible with clojure and clojurescript ;)
On Sun, Jun 21, 2015 at 5:05 PM, Karsten Schmidt wrote:
> That's ++great, Lars! Would you be open to convert this into CLJC so
> it can all be used from CLJS as well? I guess
That's ++great, Lars! Would you be open to convert this into CLJC so
it can all be used from CLJS as well? I guess the main stumbling block
is the use of java.text.Normalizer in strip-accents, but that could be
replaced with a hardcoded regexp solution for CLJS...
Thanks!
On 21 June 2015 at 13:45