Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

regular-grammar

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regular-grammar - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5-b

2

package.json
{
"name": "regular-grammar",
"version": "0.1.4",
"version": "0.1.5b",
"description": "A simple regular grammar/parser generator",

@@ -5,0 +5,0 @@ "author": "Victor Grishchenko <victor.grishchenko@gmail.com>",

@@ -182,3 +182,3 @@ /** The class generates regex _parsers for simple regular languages

const m = parser.exec(text);
if (!m) { throw new Error('grammar violation'); }
if (!m) { return null; }
for (let i = 0; i < triplets.length; i++) {

@@ -212,5 +212,7 @@ const triplet = triplets[i];

function sterilize (pattern) {
return pattern.replace(/\((\?:)?/g, '(?:');
// FIXME build sterilized, retire this hack
return pattern.replace(/\((\?:)?/g, '(?:').
replace(/\\\(\?:/g, '\\(');
}
module.exports = Grammar;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc