New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

char-regex

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

char-regex - npm Package Compare versions

Comparing version

to
2.0.2

14

index.js

@@ -12,3 +12,3 @@ // Based on https://github.com/lodash/lodash/blob/6018350ac10d5ce6a5b7db625140b82aeab804df/.internal/unicodeSize.js

const comboRange = comboMarksRange + comboHalfMarksRange + comboSymbolsRange + comboMarksExtendedRange + comboMarksSupplementRange;
const varRange = '\\ufe0e\\ufe0f';
const variableRange = '\\ufe0e\\ufe0f';

@@ -22,4 +22,4 @@ // Telugu characters

const teluguNumerals = '\\u0c66-\\u0c6f\\u0c78-\\u0c7e';
const teluguSingle = `[${teluguVowels}(?:${teluguConsonants}(?!\\u0c4d))${teluguNumerals}${teluguConsonantsRare}]`;
const teluguDouble = `[${teluguConsonants}${teluguConsonantsRare}][${teluguVowelsDiacritic}]|[${teluguConsonants}${teluguConsonantsRare}][${teluguModifiers}`;
const teluguSingle = `[${teluguVowels}${teluguNumerals}${teluguConsonantsRare}]|[${teluguConsonants}](?!\\u0c4d)`;
const teluguDouble = `[${teluguConsonants}${teluguConsonantsRare}][${teluguVowelsDiacritic}]|[${teluguConsonants}${teluguConsonantsRare}][${teluguModifiers}]`;
const teluguTriple = `[${teluguConsonants}]\\u0c4d[${teluguConsonants}]`;

@@ -41,5 +41,5 @@ const telugu = `(?:${teluguTriple}|${teluguDouble}|${teluguSingle})`;

const optModifier = `${modifier}?`;
const optVar = `[${varRange}]?`;
const optJoin = `(?:${zeroWidthJoiner}(?:${[nonAstral, regional, surrogatePair].join('|')})${optVar + optModifier})*`;
const seq = optVar + optModifier + optJoin;
const optVariable = `[${variableRange}]?`;
const optJoin = `(?:${zeroWidthJoiner}(?:${[nonAstral, regional, surrogatePair].join('|')})${optVariable + optModifier})*`;
const seq = optVariable + optModifier + optJoin;
const nonAstralCombo = `${nonAstral}${combo}?`;

@@ -49,3 +49,3 @@ const symbol = `(?:${[blackFlag, nonAstralCombo, combo, regional, surrogatePair, astral].join('|')})`;

// Match string symbols (https://mathiasbynens.be/notes/javascript-unicode)
return new RegExp(`${fitz}(?=${fitz})|${telugu}|${symbol + seq}`, 'g');
return new RegExp(`${fitz}(?=${fitz})|${telugu}|${symbol + seq}`, 'g'); // eslint-disable-line no-misleading-character-class
}
{
"name": "char-regex",
"version": "2.0.1",
"version": "2.0.2",
"description": "A regex to match any full character, considering weird character ranges.",

@@ -33,6 +33,6 @@ "repository": "Richienb/char-regex",

"all-chars": "^1.0.0",
"ava": "^4.0.1",
"tsd": "^0.19.1",
"xo": "^0.48.0"
"ava": "^6.2.0",
"tsd": "^0.31.2",
"xo": "^0.59.3"
}
}

Sorry, the diff of this file is not supported yet