1.0.0 • Published 2 years ago
emojilib-translate v1.0.0
emojilib-translate
emojilib-translate helps you translate normal text into emojis.
It uses the muan/emojilib as a datasource for emojis. Also included is an inverter script to invert this datasource for easier lookups.
This project was originally forked from vbrown608/netlify-plugin-emoji-translate and the following high-level changes were made:
- Updated muan/emojilib dependency to 3.0.x
- Updated inverter.js to handle new muan/emojilib 3.x emoji datasource format
- Added additional logic to translator to handle emojis with multi-worded names
- Removed netlify-related plugin code to keep it simple
emojilib-translate
└─── README.md ................................. You are here
└─── emojis.json ............................... the inverted emoji datasource generated by inverter.js
└─── index.js .................................. the main translation library
└─── inverter.js ............................... inverts the emoji data from muan/emojilib for faster
lookups. Only need to run when muan/emojilib is updated.
Usage
npm install joshpainter/emojilib-translate
const emojiTranslate = require('emojilib-translate');
const translatedText = emojiTranslate.translate(text);
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
1.0.0
2 years ago