@pixim/emoji

Pixiv's custom emoji converter

Usage no npm install needed!

<script type="module">
  import piximEmoji from 'https://cdn.skypack.dev/@pixim/emoji';
</script>

README

@pixim/emoji

npm

Pixiv's custom emoji converter

Installation

npm i @pixim/emoji --save

Become a patron

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