Plenty of services love to use the emoji shortcodes in plain-text markup, so this library aims to simplify that process
for you, making :sunglasses:
, :bulb:
, etc. There's
an amazing list of shortcodes here if you want to explore them.
var emoji = require('emoji-shorts');
console.log(emoji.toPlain('These violent delights have violent ends π'));
// These violent delights have violent ends :smiling_imp:
console.log(emoji.toRich('The most elegant parts of me weren\'t written by you :thinking:'));
// The most elegant parts of me weren't written by you π€
This module is built using lodash.toarray@4
and
github/gemoji
(a big
Check out example.js
for more
- Originally published via @car-throttle.
- Questions? Awesome! Open an issue to get started!