Skip to content

joshpainter/emojilib-translate

 
 

Repository files navigation

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

  1. npm install emojilib-translate
  2. const emojiTranslate = require('emojilib-translate');
  3. 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

Apache License, Version 2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%