node-emoji

  • Version 2.1.0
  • Published
  • 42.1 kB
  • 4 dependencies
  • MIT license

Install

npm i node-emoji
yarn add node-emoji
pnpm add node-emoji

Overview

Friendly emoji lookups and parsing utilities for Node.js

Index

Functions

function emojify

emojify: (input: string, { fallback, format }?: EmojifyOptions) => string;

    function find

    find: (codeOrName: string) => { emoji: string; key: string } | undefined;

      function get

      get: (codeOrName: string) => string | undefined;

        function has

        has: (codeOrName: string) => boolean;

          function random

          random: () => { name: string; emoji: string };

            function replace

            replace: (
            input: string,
            replacement: string | ReplaceReplacement,
            { preserveSpaces }?: { preserveSpaces?: boolean | undefined }
            ) => string;
              search: (keyword: string) => { name: string; emoji: string }[];

                function strip

                strip: (input: string, { preserveSpaces }?: StripOptions) => string;

                  function unemojify

                  unemojify: (input: string) => string;

                    function which

                    which: (emoji: string, { markdown }?: WhichOptions) => string | undefined;

                      Interfaces

                      interface EmojifyOptions

                      interface EmojifyOptions {}

                        property fallback

                        fallback?: string | ((part: string) => string);

                          property format

                          format?: EmojifyFormat;

                            interface StripOptions

                            interface StripOptions {}

                              property preserveSpaces

                              preserveSpaces?: boolean;

                                interface WhichOptions

                                interface WhichOptions {}

                                  property markdown

                                  markdown?: boolean;

                                    Type Aliases

                                    type EmojifyFormat

                                    type EmojifyFormat = (name: string, part?: string, input?: string) => string;

                                      type ReplaceReplacement

                                      type ReplaceReplacement = (emoji: Emoji, index: number, string: string) => string;

                                        Namespaces

                                        namespace emojilib

                                        module 'emojilib' {}

                                          variable lib

                                          const lib: Record<string, { char: string }>;

                                            Package Files (2)

                                            Dependencies (4)

                                            Dev Dependencies (6)

                                            Peer Dependencies (0)

                                            No peer dependencies.

                                            Badge

                                            To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                            You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/node-emoji.

                                            • Markdown
                                              [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/node-emoji)
                                            • HTML
                                              <a href="https://www.jsdocs.io/package/node-emoji"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>