🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@amritk/helpers

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amritk/helpers - npm Package Compare versions

Comparing version
0.13.0
to
0.13.1
+8
-0
dist/escape-regex-pattern.js

@@ -67,2 +67,10 @@ /**

});
// The empty pattern is valid JSON Schema (it matches everything), but an empty
// regex body would emit `//` \u2014 a line comment, not a literal \u2014 and break the
// generated file. Emit `(?:)` instead, exactly what `new RegExp('').source`
// yields: an empty non-capturing group that still matches everything.
if (escaped === '') {
escapeCache.set(pattern, '(?:)');
return '(?:)';
}
if (escapeCache.size >= ESCAPE_CACHE_LIMIT) {

@@ -69,0 +77,0 @@ // Evict the single oldest entry (Maps iterate in insertion order) instead

+1
-1
{
"name": "@amritk/helpers",
"version": "0.13.0",
"version": "0.13.1",
"description": "Shared utilities for the mjst code generation ecosystem.",

@@ -5,0 +5,0 @@ "type": "module",

@@ -70,2 +70,11 @@ /**

// The empty pattern is valid JSON Schema (it matches everything), but an empty
// regex body would emit `//` \u2014 a line comment, not a literal \u2014 and break the
// generated file. Emit `(?:)` instead, exactly what `new RegExp('').source`
// yields: an empty non-capturing group that still matches everything.
if (escaped === '') {
escapeCache.set(pattern, '(?:)')
return '(?:)'
}
if (escapeCache.size >= ESCAPE_CACHE_LIMIT) {

@@ -72,0 +81,0 @@ // Evict the single oldest entry (Maps iterate in insertion order) instead