@pixim/emoji
v0.0.4
Published
Pixiv's custom emoji converter
Downloads
7
Readme
@pixim/emoji
Pixiv's custom emoji converter
Installation
npm i @pixim/emoji --save
Usage
emoijfy
Convert emoji keywords (e.g. (heart)
) to HTML img elements.
import { emojify } from '@pixim/emoji';
emojify('I like this! (heart)');
// -> 'I like this! <img class="__pixiv-emoji" src="https://s.pximg.net/common/images/emoji/501.png" alt="heart" title="heart">'
stringify
The contrary of emojify
import { stringify } from '@pixim/emoji';
stringify('I like this! <img class="__pixiv-emoji" src="https://s.pximg.net/common/images/emoji/501.png" alt="heart" title="heart">');
// -> 'I like this! (heart)'
License
AGPL v3