Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
emoji-aware
Advanced tools
Emoji-aware unicode string utilities for JavaScript.
You'll need these if you ever want to split strings that contain emoji.
If you use naive methods for this (or packages that purport to split unicode strings correctly) you'll have trouble because emoji can span multiple characters/surrogate pairs.
The longest emoji I'm aware of is specified by 4 "regular" emoji (one, a heart, with its own variation selector) with zero-width joiners in between them. That's 8 unicode characters as split by most libraries. This library will correctly split that emoji into one entry in the returned array of characters.
(But the unicode portion probably needs some more work).
var split = require('emoji-aware').split;
var result = split('cats 😸 are the best');
result[5] === '😸';
// true
A starker example that uses Mathias Bynens' getSymbols
with a
composed emoji:
FAQs
Emoji-aware unicode string utilities
The npm package emoji-aware receives a total of 2,490 weekly downloads. As such, emoji-aware popularity was classified as popular.
We found that emoji-aware demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.