eil-js
Version:
The Emoji Interaction Library (EIL) is designed to seamlessly convert text emojis, such as :), into their actual emoji representations, e.g., 🙂. This library supports customization, allowing users to register their own custom emojis or mappings.
43 lines (25 loc) • 665 B
Markdown
Convert emoji shortcodes into their actual emoji representations with ease!
**npm**:
```bash
npm install eil-js
```
**cdn**:
`<script src="https://unpkg.com/eil-js@0.0.1/dist/emojiInteraction.js"></script>`
```javascript
import { EmojiInteraction } from "eil-js";
const ei = new EmojiInteraction();
console.log(ei.convert("RocknRoll :the_horns:")); // Outputs: RocknRoll 🤘
// Register custom mapping
ei.registerMapping("bad_mood", "😕");
```
```javascript
ei.registerMapping("happy_smile", "😄");
```
Contributions are welcomed!
MIT