DEV Community

taroyanaka
taroyanaka

Posted on

3 1

How to show all emoji in javascript

// all emoji
[...Array(10000000).keys()]
.map(v=>String.fromCharCode(v))
.filter(v=>/\p{Emoji_Modifier_Base}\p{Emoji_Modifier}|\p{Emoji_Presentation}|\p{Emoji}\uFE0F/gu.test(v))
// all kanji(hanzi)
[...Array(10000000).keys()]
.map(v=>String.fromCharCode(v))
.filter(v=>v.match(/[一-龠]/))

code like a lazy evaluation

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay