Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 22, 2024 via pnpm

emoji-regex 8.0.0

A regular expression to match all Emoji-only symbols as per the Unicode Standard.
Package summary
Share
0
issues
1
license
1
MIT
Package created
28 Sep 2014
Version published
5 Mar 2019
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
emoji-regex@8.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
ⓘ This is a list of emoji-regex 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does emoji-regex do?

Emoji-regex is a powerful npm package designed to provide a regular expression for matching all emoji symbols and sequences, including the textual representations of emoji, as per the Unicode Standard. This versatility makes it easy to update the emoji-regex whenever new emojis are added to Unicode, enhancing the functionality and adaptability of your JavaScript projects.

How do you use emoji-regex?

To use the emoji-regex npm package in your JavaScript projects, you first need to install it via npm by running the code npm install emoji-regex in your terminal. Once the installation is complete, you can require the package in your Node.js files and use it to create a regular expression for emoji symbols and sequences. Below is an example of how to use emoji-regex in JavaScript:

const emojiRegex = require('emoji-regex');

const text = `
\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation)
\u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji
\u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base)
\u{1F469}\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier
`;

const regex = emojiRegex();
for (const match of text.matchAll(regex)) {
  const emoji = match[0];
  console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`);
}

In this example, the emoji-regex is used to create a regular expression that identifies and matches all emoji sequences present in the provided text, logging each matched emoji sequence and its code points length to the console.

Where are the emoji-regex docs?

The documentation for emoji-regex is provided on its GitHub page: https://github.com/mathiasbynens/emoji-regex. There you can find in-depth information about the use, installation process, maintenance, and licensing of the emoji-regex npm package, guaranteeing a smooth integration of this valuable tool into your JavaScript workflow.