Skip to main content

DeMoji

Convert text-mojis to REAL emojis!!

nest badge Issues Forks Stars Licence

DeMoji is a Deno package used to convert text emojis (“:)” or “:(“) to ACTUAL REAL emojis!! You can use it when (say) you want to automagically convert user text to emojis. It is a really small package but helpful at times.

Usage

import {emojiConv} from ""

let text = "Hello World :)"

let expressed = emojiConv(text)

console.log(expressed)
// Hello World 😊

The package is on deno.land and nest.land, the import URLs are:

API

function emojiConv(text: string, emojiJson?: Object)

The main function. Takes in a string which is some text and an optional JSON object ({ emojiShorthand: emoji, ... }) that contains custom emojis to use, if that is the case. The underlying emojis.json file will be updated often, so it is recommended to not use that right now.

Thanks.