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

cucumber-expressions

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cucumber-expressions - npm Package Compare versions

Comparing version 5.0.12 to 5.0.13

12

dist/src/tree_regexp.js

@@ -25,7 +25,3 @@ 'use strict';

this._re.source.split('').forEach(function (c, n) {
if (escaping && isRegexpChar(c)) {
escaping = false;
} else if (c === '\\') {
escaping = true;
} else if (c === '(' && !escaping) {
if (c === '(' && !escaping) {
stack.push(new GroupBuilder());

@@ -50,2 +46,3 @@ groupStartStack.push(n + 1);

}
escaping = c === '\\' && !escaping;
last = c;

@@ -82,7 +79,2 @@ });

var REGEXP_CHARS = ['#', '$', '(', ')', '*', '+', '.', '/', '?', '[', '\\', '^', '{', '|'];
function isRegexpChar(c) {
return REGEXP_CHARS.indexOf(c) !== -1;
}
module.exports = TreeRegexp;

2

package.json
{
"name": "cucumber-expressions",
"version": "5.0.12",
"version": "5.0.13",
"description": "Cucumber Expressions - a simpler alternative to Regular Expressions",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

@@ -15,7 +15,3 @@ const Regex = require('becke-ch--regex--s0-0-v1--base--pl--lib')

this._re.source.split('').forEach((c, n) => {
if (escaping && isRegexpChar(c)) {
escaping = false
} else if (c === '\\') {
escaping = true
} else if (c === '(' && !escaping) {
if (c === '(' && !escaping) {
stack.push(new GroupBuilder())

@@ -40,2 +36,3 @@ groupStartStack.push(n + 1)

}
escaping = c === '\\' && !escaping
last = c

@@ -63,22 +60,2 @@ })

const REGEXP_CHARS = [
'#',
'$',
'(',
')',
'*',
'+',
'.',
'/',
'?',
'[',
'\\',
'^',
'{',
'|',
]
function isRegexpChar(c) {
return REGEXP_CHARS.indexOf(c) !== -1
}
module.exports = TreeRegexp

@@ -73,2 +73,8 @@ /* eslint-env mocha */

it('works with digit and word', () => {
const tr = new TreeRegexp(/^(\d) (\w+)$/)
const group = tr.match('2 you')
assert.equal(group.children.length, 2)
})
it('captures non capturing groups with capturing groups inside', () => {

@@ -75,0 +81,0 @@ const tr = new TreeRegexp('the stdout(?: from "(.*?)")?')

Sorry, the diff of this file is not supported yet

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