Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michyaraque/emoji-toolbox
Emoji Toolbox is a library that allows you to extract information from the emoji.
https://github.com/michyaraque/emoji-toolbox
emoji js library nodejs react reactjs
Last synced: about 6 hours ago
JSON representation
Emoji Toolbox is a library that allows you to extract information from the emoji.
- Host: GitHub
- URL: https://github.com/michyaraque/emoji-toolbox
- Owner: michyaraque
- Created: 2023-01-01T20:17:33.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-06T17:20:16.000Z (9 months ago)
- Last Synced: 2024-10-13T16:52:48.704Z (about 1 month ago)
- Topics: emoji, js, library, nodejs, react, reactjs
- Language: TypeScript
- Homepage: https://github.com/michyaraque/emoji-toolbox
- Size: 405 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![](images/banner.jpg)
# 🧰 Emoji Toolbox ~ 😁✅🎉
Want to add a touch of color to your application or website with emojis? Emoji Toolbox is the tool you need! This library allows you to extract the **dominant color of any emoji** and use it as background color or any other purpose.## Installation
To install Emoji Toolbox, run the following command in your terminal:npm or yarn
```bash
npm install emoji-toolboxyarn add emoji-toolbox
```
Once you have it installed, you can use it in your code like this:#### API
```js
import emoji from 'emoji-toolbox';emoji.identifier("✅"); // Returns the identifier of the emoji: white_check_mark
emoji.humanName("✅"); // Returns the identifier in human readable: White Check Mark
emoji.unicode("✅"); // Unicode value: U+2705
emoji.normalColor("✅", "rgb"); // Defaults return RGB value by default
emoji.softColor("✅", "hex"); // Hexadecimal explit
emoji.darkenColor("✅", "both"); // object of rgb and hex valuesemoji.hasEmoji("Detect if this phrase contains a emoji 🧰"); // True
emoji.demojify("Remove emoji from phrase 🗯️"); // Remove emoji from phrase```
This code creates a new instance of the Emoji class with the "🧽" emoji as an argument. You can then access the various properties and methods of this instance to get different pieces of data about the emoji.
For example, the emojiData property contains all the data for the emoji, including its name, Unicode, and various color styles. The name() and unicode() methods return the name and Unicode of the emoji, respectively. The normalColor() method returns the base color style of the emoji, and its hexadecimal and rgb properties contain the color in hexadecimal and RGB formats, respectively.
## License
Emoji Toolbox is available under the Apache-2.0 License.