-
-
Save jonschlinkert/72b103bf45c35027f55463156ce79180 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getAllCharacters = () => { | |
let chars = ''; | |
for (let i = 0; i <= 0x10ffff; i++) { | |
try { | |
chars += String.fromCodePoint(i); | |
} catch (e) { | |
// ignore invalid utf-16 chars | |
continue; | |
} | |
} | |
return chars; | |
} | |
console.log(getAllCharacters().length) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment