@hero-page/hero-emoji-utils

1.0.0 • Public • Published

This entire repository was created completely with AI, using the hero-ai-package-creator, which is open-source, uses GPT-4, and is written & maintained by Sam Chahine ❣️🧞‍♀️

hero-emoji-utils

A package for working with emojis in strings, allowing users to manipulate strings containing any type of emojis.

Functions

emojiSplit

Splits a string into an array of characters and emojis. Will handle standard single-codepoint emojis, combined emojis (e.g. country flags), and skin-tone-modified emojis. It does not handle invalid emoji sequences or emojis with multiple skin tones.

Example usage:

emojiSplit('Hello 😃🌎🎉'); // -> ['H', 'e', 'l', 'l', 'o', ' ', '😃', '🌎', '🎉']

emojiCount

Counts the number of emojis in a string. Will handle standard single-codepoint emojis, combined emojis (e.g. country flags), and skin-tone-modified emojis. It does not handle invalid emoji sequences or emojis with multiple skin tones.

Example usage:

emojiCount('Hello 😃🌎🎉'); // -> 3

Sam Chahine at Hero

Tests for emojiCount

emojiCount

Tests for emojiSplit

emojiSplit

Package Sidebar

Install

npm i @hero-page/hero-emoji-utils

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

9.35 kB

Total Files

8

Last publish

Collaborators

  • hero-page