Last active
November 20, 2023 09:05
-
-
Save liquidx/0eef9275131b3d27d1750ff13da5be89 to your computer and use it in GitHub Desktop.
All the emojis in a single string
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
var emojis = '👍'; | |
var separator = '|'; | |
// Really rough slicing of the ranges, omitting a ton. | |
// Manually created from here: https://github.com/mathiasbynens/unicode-tr51/blob/master/data/emoji-data.txt | |
var emojiRange = [ | |
[0x261D, 0x261D], | |
[0x270A, 0x270D], | |
[0x1F300, 0x1F320], | |
[0x1F324, 0x1F4FF], | |
[0x1F500, 0x1F53D], | |
[0x1F549, 0x1F579], | |
[0x1F57A, 0x1F57A], | |
[0x1F590, 0x1F590], | |
[0x1F595, 0x1F596], | |
[0x1f600, 0x1F6D2], | |
[0x1F910, 0x1F94C], | |
[0x1F950, 0x1F9E6], | |
] | |
for (var i = 0; i < emojiRange.length; i++) { | |
var range = emojiRange[i]; | |
for (var x = range[0]; x < range[1]; x++) { | |
emojis += separator + String.fromCodePoint(x); | |
} | |
} | |
console.log(emojis) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment