emojiconverterbyouida
v1.0.1
Published
by Ouida
Downloads
1
Readme
Emoji Converter
Emoji Converter is a lightweight JavaScript package for converting text containing emoticons to emoji and vice versa.
Installation
You can install the package via npm:
npm install emoji-converter
Usage
Converting Text to Emoji
const { textToEmoji } = require('emoji-converter');
const text = 'Hello, how are you? :)';
const emojiText = textToEmoji(text);
console.log(emojiText); // Output: Hello, how are you? 😊
Converting Emoji to Text
const { emojiToText } = require('emoji-converter');
const emojiString = 'Hello, how are you? 😊';
const convertedText = emojiToText(emojiString);
console.log(convertedText); // Output: Hello, how are you? :)
Supported Emoticons
The following emoticons are currently supported for conversion:
- :) 😊
- :( 😞
- :D 😃
- ;) 😉
- <3 ❤️
- :O 😲
- :P 😋
- :| 😐
- :* 😘
- :s 😕
- :/ 😕
- :x 😵
- :! 😱
- :o 😮
License
This project is licensed under the MIT License - see the LICENSE file for details.