Note
emoji-route allows users to request images of emojis in multiple formats including PNG, SVG, and GIF. This is perfect for applications that need dynamic emoji handling or custom emoji display in different formats.
emoji-route offers several unique features for handling and generating emojis:
- SVG Emoji Generation β Generates an SVG image containing the requested emoji.
- PNG Emoji Generation β Creates a PNG image using the
canvas
module with custom fonts for emojis. - GIF Emoji Fetching β Fetches and serves emoji GIFs directly from a reliable source.
- Random Format Response β Allows users to get a random emoji format (SVG, PNG, or GIF) with just one request.
- Fallbacks for Missing Emojis β In case an emoji isn't found, the app uses a default emoji (π©) to ensure smooth operation.
emoji-route has the following routes for different emoji formats:
Generates an SVG image of the requested emoji.
- Example:
/svg/β€οΈ
- Response: SVG containing the β€οΈ emoji.
Generates a PNG image of the requested emoji.
- Example:
/png/π»
- Response: PNG image of the π» emoji.
Fetches the emoji GIF from a reliable source and returns it. Powered by google fonts.
- Example:
/gif/π
- Response: GIF of the π emoji.
Returns a random image format (SVG, PNG, or GIF) for the requested emoji.
- Example:
/π
- Response: A randomly selected image format (SVG, PNG, or GIF) of the π emoji.
This project uses the following technologies:
- Hono β A minimal web framework for building APIs.
- Deno β JavaScript and TypeScript runtime.
- Canvas β For generating PNG images with custom fonts.
- Emoji Regex β To detect and extract emojis from strings.
- NotoColorEmoji-Regular.ttf β Font for rendering emojis.
You can add emoji-route with one command via:
# Command For Installation
npm i
Tip
We welcome contributions to improve emoji-route! If you have suggestions, bug fixes, or new feature ideas, follow these steps:
-
Fork the Repository
Click the Fork button at the top-right of the repo page. -
Clone Your Fork
Clone the repo locally:git clone https://github.com/ArnavK-09/emoji-route.git
-
Create a Branch
Create a new branch for your changes:git checkout -b your-feature-branch
-
Make Changes
Implement your changes (bug fixes, features, etc.). -
Commit and Push
Commit your changes and push the branch:git commit -m "feat(scope): description" git push origin your-feature-branch
-
Open a Pull Request
Open a PR with a detailed description of your changes. -
Collaborate and Merge
The maintainers will review your PR, request changes if needed, and merge it once approved.
Found a bug or need help? Please create an issue on the GitHub repository with a detailed description.
If you find this project helpful, please give it a β on GitHub!