Skip to content

Breaking change in words-n-numbers: Extracting single emojis instead of emoji words

Latest

Choose a tag to compare

@eklem eklem released this 20 Apr 11:24
· 45 commits to trunk since this release

The change in words-n-number is as follows:

No more "words" formed by several emojis. This because each emoji in a sense are words. Will also work better with search engines as each can be used as a filter if you have an emoji facet to filter on.

So instead of:

cons stringOfWords = 'A ticket to 大阪 costs ¥2000 👌😄 😢'
extract(stringOfWords, { regex: emojis})
// ['👌😄', '😢']

...you will get:

cons stringOfWords = 'A ticket to 大阪 costs ¥2000 👌😄 😢'
extract(stringOfWords, { regex: emojis})
// ['👌', '😄', '😢']