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.
characterset
Advanced tools
Readme
CharacterSet is a library for creating and manipulating Unicode character sets in JavaScript. Its main purpose is to help in building regular expressions for validation and matching. It fully supports all Unicode characters and correctly handles surrogate pairs in JavaScript strings and regular expressions.
If you are using Node.js you can install it using npm:
$ npm install characterset
If you want to use CharacterSet in the browser, use the global CharacterSet
constructor or include CharacterSet as an AMD module.
The constructor takes a single input value, which can either be a number, a string or a range. A range is an array of numbers or number pairs.
// Creates a character set with a single code point for [97]
var cs = new CharacterSet(97);
// Creates a character set for the code points [97, 98, 99]
var cs = new CharacterSet('abc');
// Creates a character set for the code points [97, 98, 99]
var cs = new CharacterSet([97, 98, 99]);
// Creates a character set for the code points [97, 98, 99] using a range
var cs = new CharacterSet([[97, 99]]);
// Combines pairs and numbers in ranges for [0, 97, 98, 99]
var cs = new CharacterSet([48, [97, 99]]);
Or you can use the parseUnicodeRange
method to return a CharacterSet instance from a comma-delimited unicode range string.
// Creates a character set for the code points [34, 35]
var cs = CharacterSet.parseUnicodeRange('u+23,u+22');
// Creates a character set for the code points [34, 35, 36, 37]
var cs = CharacterSet.parseUnicodeRange('u+22-25');
Once you have an instance of CharacterSet you can use the following methods on it:
CharacterSet is licensed under the three clause BSD license (see BSD.txt.)
FAQs
A library for working with Unicode character sets
The npm package characterset receives a total of 823 weekly downloads. As such, characterset popularity was classified as not popular.
We found that characterset 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.