0.1.1 β€’ Published 2 years ago

shortcode2emoji v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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