🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@dlghq/emoji

Package Overview
Dependencies
Maintainers
9
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dlghq/emoji

Emoji library

latest
Source
npmnpm
Version
2.16.7
Version published
Maintainers
9
Created
Source

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

FAQs

Package last updated on 28 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts