I was trying to use this on my blog post title for a generated social image and noticed that 🛠 isn't removed:
import emojiRegex from 'emoji-regex'
function emojiStrip(string: string) {
return string.replace(emojiRegex(), '')
}
console.log(emojiStrip('Tools without config 🛠📦')) // Tools without config 🛠
console.log(emojiStrip('Tools without config 📦')) // Tools without config
console.log(emojiStrip('Tools without config 🛠')) // Tools without config 🛠
console.log(emojiStrip('Tools without config 📦🛠')) // Tools without config 🛠
EDIT: I've found the same issue with the race car emoji 🏎
I was trying to use this on my blog post title for a generated social image and noticed that 🛠 isn't removed:
EDIT: I've found the same issue with the race car emoji 🏎