chirp icon indicating copy to clipboard operation
chirp copied to clipboard

🐛 temporarily fixed the issue of emojies accepting number as input

Open prabincankod opened this issue 1 year ago • 2 comments

prabincankod avatar Mar 24 '23 04:03 prabincankod

Someone is attempting to deploy a commit to a Personal Account owned by @t3dotgg on Vercel.

@t3dotgg first needs to authorize it.

vercel[bot] avatar Mar 24 '23 04:03 vercel[bot]

Numbers are used in strings often for emojis, are you sure this works on all emojis?

t3dotgg avatar Mar 24 '23 04:03 t3dotgg

@t3dotgg we can use emoji-regex for this and just ensure we always getting just the emojis. It's by a well known Open Sourcerer.

Just let it as it was originally, then just filter the content with something similar.

import emojiRegex from 'emoji-regex';

const str = "pizza 🍕 temp 🐛 foo";
const result = str.match(emojiRegex());

console.log(result.join(""));
// => 🍕🐛

tunnckoCore avatar Apr 23 '23 03:04 tunnckoCore