node-emoji

  • Version 2.1.3
  • Published
  • 59.8 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: () => { emoji: string; name: string };

            function replace

            replace: (
            input: string,
            replacement: ReplaceReplacement | string,
            { preserveSpaces }?: { preserveSpaces?: boolean | undefined }
            ) => string;
              search: (keyword: string) => { emoji: string; name: 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?: ((part: string) => 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;

                                        Package Files (1)

                                        Dependencies (4)

                                        Dev Dependencies (38)

                                        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>