Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/twlite/emoji-api
Simple Emoji API.
https://github.com/twlite/emoji-api
emoji emoji-api hacktoberfest
Last synced: about 1 month ago
JSON representation
Simple Emoji API.
- Host: GitHub
- URL: https://github.com/twlite/emoji-api
- Owner: twlite
- License: gpl-3.0
- Created: 2021-01-07T14:58:34.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-02T17:05:08.000Z (about 2 years ago)
- Last Synced: 2024-09-20T00:27:42.289Z (about 2 months ago)
- Topics: emoji, emoji-api, hacktoberfest
- Language: TypeScript
- Homepage: https://npmjs.com/package/emoji-api
- Size: 82 KB
- Stars: 18
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EmojiAPI
Simple Emoji API.# Installing
```sh
$ npm i emoji-api
```# Example
```js
// ESM
import * as emoji from "emoji-api";
// CJS
const emoji = require("emoji-api");console.log(emoji.get("🥺"));
/*
Emoji {
_data: {
emoji: '🥺',
name: 'pleading face',
group: 'Smileys & Emotion',
sub_group: 'face-concerned',
codepoints: '1F97A'
}
}
*/console.log(emoji.get("🥺").formattedName); // Pleading Face
console.log(emoji.get("🥺").twemoji()); // https://twemoji.maxcdn.com/v/latest/72x72/1f97a.png
```## Arrange emojis by category
```js
const { arrange } = require("emoji-api");console.log(arrange()); // { "Smileys & Emotion": [Emoji, Emoji, ...], ... }
```# Other Examples
```js
console.log(emoji.all()); // [Emoji, Emoji, Emoji, ...]
console.log(emoji.emojiToUnicode("🥺")); // 1f97a
console.log(emoji.unicodeToEmoji("1f97a")); // 🥺
```