Deno.js Emoji Module to Validate,Trim & Extract Emoji From String Using TypeScript Full Project For Beginners



Simple emoji support for Deno 🦕 (validate, detect, trim, extract)





import { isEmoji } from "";



import { isEmoji } from "";



isEmoji (string)


Returns true if provided string is a valid emoji.


isEmoji('🤔'); // true
isEmoji('?'); // false

hasEmoji (string)


Returns true if there is at least one emoji in string.


hasEmoji('Sadly, no unicorns found..'); // false
hasEmoji('But we have one here: 🦄'); // true

trimEmoji (string)


Returns the string cleaned from emoji.


trimEmoji('Just 👏 Do 👏 It'); // "Just  Do  It"

extractEmoji (string)


Returns an array of emoji extracted from the string.


extractEmoji('🦕 ❤️ 🦄'); // ["🦕", "❤️", "🦄"]

Leave a Reply