randexp.js
randexp.js copied to clipboard
fromCodePoint
Hi there,
Nice library! Just a quick suggestion: you may consider using fromCodePoint rather than fromCharCode so UTF-8 characters can be supported. :)
That's not necessary. Supplementary plane code points are already supported. What's not working for you?
When I set the default range to a high integer (e.g. 18943) it doesn't produce a character.
Seems obvious, since fromCharCode doesn't support the highest Unicode values.
Compare these: document.write(String.fromCodePoint(194564)); document.write(String.fromCharCode(194564));