@pixim/emoji
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @pixim/emoji

Weekly Downloads

0

Version

0.0.4

License

AGPL-3.0-or-later

Unpacked Size

43.3 kB

Total Files

7

Last publish

Collaborators

  • neetshin