0.1.1 β’ Published 2 years ago
shortcode2emoji v0.1.1
shortcode2emoji
Convert shortcodes to emojis.
Install
pnpm add shortcode2emoji # or npm or yarn
Example
import { replaceColons } from 'shortcode2emoji'
const text = replaceColons('Hello :world_map:');
console.log(text) //prints 'Hello πΊοΈ'
Or from the map:
import { emojiMap } from 'shortcode2emoji'
const text = emojiMap[':family_woman_woman_girl_boy:'];
console.log(text) //prints 'π©βπ©βπ§βπ¦'
Credits to this data.
License
MIT