@dlghq/emoji

    2.16.3 • Public • Published

    Dialog Emoji

    Installation

    npm install --save @dlghq/emoji
    

    Usage

    import {
      categories,
      getEmojiByChar,
      getEmojiByName
    } from '@dlghq/emoji';
    import AppleEmojiImage from '@dlghq/emoji/lib/apple.png';
    
    const { x, y } = getEmojiByName('smile');

    API

    type Emoji = {
      char: string,
      name: ?string,
      x: number,
      y: number,
      variations?: string[]
    };

    categories: { [name: string]: string[] }

    Object where key is the category name and value is array of emoji chars


    getEmojiByChar: (char: string) => ?Emoji Function which resolve char to emoji. Returns null if emoji not found.


    getEmojiByName: (name: string) => ?Emoji Function which resolve emoji by short name. Returns null if emoji not found.

    License

    Apache-2.0

    Keywords

    none

    Install

    npm i @dlghq/emoji

    DownloadsWeekly Downloads

    249

    Version

    2.16.3

    License

    Apache-2.0

    Unpacked Size

    14.1 MB

    Total Files

    15

    Last publish

    Collaborators

    • argonavt11
    • dialogs
    • dlghq-bot
    • timurkhabibullin