Git Product home page Git Product logo

emojilib's Introduction

emojilib CI status npm JavaScript Standard Style

Make emoji searchable with this keyword library.

Install

npm install emojilib --save

Usage

> 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.

Migrating from 2.x

Previously:

> 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:

> 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:

> var emoji = require("emojilib")
> emoji.ordered
[ 'grinning', 'grimacing', 'grin', 'joy', 'smiley', 'smile', 'sweat_smile', ...]

Now this data can be found in unicode-emoji-json:

> var orderedEmoji = require('unicode-emoji-json/data-ordered-emoji')
['๐Ÿ˜€', '๐Ÿ˜ƒ', '๐Ÿ˜„', '๐Ÿ˜', '๐Ÿ˜†', '๐Ÿ˜…',...]

Previously:

> var emoji = require("emojilib")
> emoji.fitzpatrick_scale_modifiers
[ '๐Ÿป', '๐Ÿผ', '๐Ÿฝ', '๐Ÿพ', '๐Ÿฟ' ]

Now this data can be found in unicode-emoji-json:

> 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:

> require("emojilib").lib['v'].fitzpatrick_scale
true

> require("emojilib").lib['turtle'].fitzpatrick_scale
false

Now this data can be found in unicode-emoji-json:

> require('unicode-emoji-json')['โœŒ๏ธ'].skin_tone_support
true
> require('unicode-emoji-json')['๐Ÿข'].skin_tone_support
false

Development

See CONTRIBUTING.md.

emojilib's People

Contributors

allolex avatar alrra avatar andreruffert avatar andyvarvel avatar audreyt avatar chanyuding avatar davefp avatar decanus avatar deon avatar fastidious avatar iamdharmveer avatar ivavictoria avatar iviolinsolo avatar jasonrudolph avatar juniperbelmont avatar kikobeats avatar muan avatar nelsonpecora avatar nishant-jain avatar notwaldorf avatar reyesh avatar sdknjg8zxq avatar sebastianaigner avatar sowmi3thri avatar sumanjeetsandhu avatar tamastimar avatar techforevil avatar wbinnssmith avatar yous avatar zeke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.