@hero-page/hero-emoji-utils
v1.0.0
Published
A package for working with emojis in strings, allowing users to manipulate strings containing any type of emojis.
Downloads
1
Maintainers
Readme
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