mirror of
https://github.com/jbranchaud/til
synced 2026-01-02 22:58:01 +00:00
Add Expand Emojis With The Spread Operator as a javascript til
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
# Expand Emojis With The Spread Operator
|
||||
|
||||
```javascript
|
||||
[... '🔥']
|
||||
["🔥"]
|
||||
[... '👊🏽']
|
||||
["👊", "🏽"]
|
||||
[... '👩👩👦']
|
||||
["👩", ""👩", ""👦"]
|
||||
[... '👨👨👦👦']
|
||||
["👨", "", "👨", ""👦", ""👦"]
|
||||
```
|
||||
There are a number of emojis that are not stand-alone unicode characters,
|
||||
but instead are [a combination of two or more other
|
||||
emojis](http://unicode.org/emoji/charts/full-emoji-list.html#1f468_200d_1f469_200d_1f466).
|
||||
The two main places this happens is with family emojis and emojis using
|
||||
non-simpsons skin tones.
|
||||
|
||||
You can use JavaScript's spread operator to expand these emojis to see what
|
||||
their base components are. Here is a screenshot of a few that I expanded
|
||||
from Chrome's dev tools.
|
||||
|
||||

|
||||
|
||||
[source](https://twitter.com/wesbos/status/769228067780825088)
|
||||
|
||||
Reference in New Issue
Block a user