Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muan/emojilib
Emoji keyword library.
https://github.com/muan/emojilib
emoji emoji-searcher
Last synced: 2 days ago
JSON representation
Emoji keyword library.
- Host: GitHub
- URL: https://github.com/muan/emojilib
- Owner: muan
- License: mit
- Created: 2013-12-26T19:30:18.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T13:18:42.000Z (about 1 month ago)
- Last Synced: 2024-12-08T16:11:58.749Z (4 days ago)
- Topics: emoji, emoji-searcher
- Language: JavaScript
- Homepage: https://unpkg.com/emojilib@latest
- Size: 7.91 MB
- Stars: 1,670
- Watchers: 29
- Forks: 296
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-fonts - emojilib - Emoji keyword library (Emojis)
- awesome-starred - muan/emojilib - Emoji keyword library. (emoji)
README
# emojilib ![CI status](https://github.com/muan/emojilib/workflows/Test%20dataset/badge.svg?branch=main) [![npm](https://img.shields.io/npm/dt/emojilib.svg?style=flat-square&colorB=fd7463)](https://www.npmjs.com/package/emojilib) [![JavaScript Standard Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square&colorB=f1d04a)](https://github.com/feross/standard)
Make emoji searchable with this keyword library.
## Install
```
npm install emojilib --save
```## Usage
```javascript
> require("emojilib")
{
'ð': [
'grinning_face',
'face',
'smile',
'happy',
'joy',
':D',
'grin'
],
'ð': [
'grinning_face_with_big_eyes',
'face',
'happy',
'joy',
'haha',
...
}
```If you are looking for the unicode emoji dataset, including version, grouping, ordering, and skin tone support flag, check out [`unicode-emoji-json`](https://github.com/muan/unicode-emoji-json).
## Migrating from 2.x
Previously:
```js
> var emoji = require("emojilib")
> emoji.lib
{
"grinning": {
"keywords": ["face", "smile", "happy", "joy"],
"char": "ð",
"fitzpatrick_scale": false,
"category": "people"
},
...
}
```Now, merge keywords with other metadata from `unicode-emoji-json`:
```js
> var data = require('unicode-emoji-json')
> var keywordSet = require('emojilib')
> for (const emoji in data) {
data[emoji]['keywords'] = keywordSet[emoji]
}
> data['ð']
{
name: 'grinning face',
slug: 'grinning_face',
group: 'Smileys & Emotion',
emoji_version: '1.0',
unicode_version: '1.0',
skin_tone_support: false,
keywords: [ 'grinning_face', 'face', 'smile', 'happy', 'joy', ':D', 'grin' ]
}
```---
Previously:
```js
> var emoji = require("emojilib")
> emoji.ordered
[ 'grinning', 'grimacing', 'grin', 'joy', 'smiley', 'smile', 'sweat_smile', ...]
```Now this data can be found in `unicode-emoji-json`:
```js
> var orderedEmoji = require('unicode-emoji-json/data-ordered-emoji')
['ð', 'ð', 'ð', 'ð', 'ð', 'ð ',...]
```---
Previously:
```js
> var emoji = require("emojilib")
> emoji.fitzpatrick_scale_modifiers
[ 'ðŧ', 'ðž', 'ð―', 'ðū', 'ðŋ' ]
```Now this data can be found in `unicode-emoji-json`:
```js
> require('unicode-emoji-json/data-emoji-components')
{
light_skin_tone: 'ðŧ',
medium_light_skin_tone: 'ðž',
medium_skin_tone: 'ð―',
medium_dark_skin_tone: 'ðū',
dark_skin_tone: 'ðŋ',
red_hair: 'ðĶ°',
curly_hair: 'ðĶą',
white_hair: 'ðĶģ',
bald: 'ðĶē'
}
```Previously:
```js
> require("emojilib").lib['v'].fitzpatrick_scale
true> require("emojilib").lib['turtle'].fitzpatrick_scale
false
```Now this data can be found in `unicode-emoji-json`:
```js
> require('unicode-emoji-json')['âïļ'].skin_tone_support
true
> require('unicode-emoji-json')['ðĒ'].skin_tone_support
false
```## Development
See `CONTRIBUTING.md`.