@kinn_yj/emojinga
v1.2.2
Published
A simple and lightweight library to fetch and load emojis.
Downloads
626
Maintainers
Readme
emojinga
A simple and lightweight JavaScript library to fetch and load emojis.
Features
- Fast and lightweight.
- Includes a curated list of popular emojis.
- Find emojis by name or keyword.
- Get random emojis.
- Works in Node.js (ES Modules).
Installation
npm install emojingaUsage
import {
getAllEmojis,
getEmoji,
searchEmoji,
getRandomEmoji
} from 'emojinga';
// Get a specific emoji by name
console.log(getEmoji('grinning face'));
// Output: 😀
// Search for emojis using keywords
const loveEmojis = searchEmoji('love');
console.log(loveEmojis);
// Output: [ { emoji: '😍', name: 'smiling face with heart-eyes', category: 'Smileys & Emotion', keywords: [...] }, ... ]
// Get a random emoji
console.log(getRandomEmoji());
// Output: 🚀 (or any other random emoji)
// Get all available emojis
const all = getAllEmojis();
console.log(`There are ${all.length} emojis available.`);API
getEmoji(name)
Returns the emoji character (string) for the exact name provided. Case-insensitive. Returns null if not found.
searchEmoji(keyword)
Returns an array of emoji objects that match the keyword in either their name or keywords list.
getRandomEmoji()
Returns a single random emoji character.
getAllEmojis()
Returns an array of all emoji objects available in the library.
License
MIT
changelog
[1.0.0-beta.1] - 2026-04-22
- typescript support
- build command
how to use with typescript
import {
getAllEmojis,
getEmoji,
searchEmoji,
getRandomEmoji,
} from "emojinga";
// Get a specific emoji by name
console.log(getEmoji("grinning face"));
// Output: 😀[1.0.2] - 2026-04-23
- change require to import
[1.0.3] - 2026-04-23
- add export emojis.js
[1.2.1] - 2026-04-27
- add category
