Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
astral-regex
Advanced tools
Package description
The astral-regex npm package is designed to provide a regular expression for matching astral symbols in text. Astral symbols are Unicode symbols that consist of a pair of surrogate halves and are used to represent characters outside the Basic Multilingual Plane (BMP). This package is particularly useful for applications that need to process, validate, or manipulate text containing such symbols, ensuring compatibility with the full range of Unicode characters.
Matching astral symbols
This feature allows you to match and extract astral symbols from a string of text. The code sample demonstrates how to use the package to find astral symbols within a given string. In this example, the astral symbol '𠮷' is successfully matched and extracted from the text.
"𠮷野家".match(astralRegex()); // Returns ['𠮷']
The emoji-regex package provides a regular expression to match Unicode emoji characters. While astral-regex is focused on matching any astral symbol, emoji-regex specializes in emojis, which are a subset of astral symbols. This makes emoji-regex more suitable for applications specifically dealing with emoji processing.
XRegExp is an extended JavaScript regex library that, among other enhancements, provides support for Unicode including astral symbols. Compared to astral-regex, XRegExp offers a broader range of regex features and capabilities, making it a more versatile choice for complex text processing tasks that require beyond basic astral symbol matching.
Readme
Regular expression for matching astral symbols
$ npm install astral-regex
const astralRegex = require('astral-regex');
astralRegex({exact: true}).test('');
//=> true
Returns a RegExp
for matching astral symbols.
Type: Object
Type: boolean
Default: false
(Matches any astral symbols in a string)
Only match an exact string. Useful with RegExp#test()
to check if a string is a astral symbol.
MIT © Kevin Mårtensson
FAQs
Regular expression for matching astral symbols
The npm package astral-regex receives a total of 17,424,137 weekly downloads. As such, astral-regex popularity was classified as popular.
We found that astral-regex 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.