cucumber-expressions
Advanced tools
Comparing version 5.0.2 to 5.0.3
@@ -19,4 +19,4 @@ 'use strict'; | ||
key: 'add', | ||
value: function add(group_builder) { | ||
this._groupBuilders.push(group_builder); | ||
value: function add(groupBuilder) { | ||
this._groupBuilders.push(groupBuilder); | ||
} | ||
@@ -23,0 +23,0 @@ }, { |
@@ -17,3 +17,3 @@ 'use strict'; | ||
this._re = 'string' === typeof regexp ? new RegExp(regexp) : regexp; | ||
this._regex = new Regex(this._re); | ||
this._regex = new Regex(this._re.source, this._re.flags); | ||
@@ -20,0 +20,0 @@ var stack = [new GroupBuilder()]; |
{ | ||
"name": "cucumber-expressions", | ||
"version": "5.0.2", | ||
"version": "5.0.3", | ||
"description": "Cucumber Expressions - a simpler alternative to Regular Expressions", | ||
@@ -37,9 +37,9 @@ "main": "dist/src/index.js", | ||
"babel-polyfill": "^6.26.0", | ||
"babel-preset-env": "^1.6.0", | ||
"eslint": "^4.0.0", | ||
"babel-preset-env": "^1.6.1", | ||
"eslint": "^4.10.0", | ||
"eslint-config-eslint": "^4.0.0", | ||
"eslint-config-prettier": "^2.1.1", | ||
"eslint-config-prettier": "^2.7.0", | ||
"eslint-plugin-prettier": "^2.0.1", | ||
"mocha": "^4.0.0", | ||
"nyc": "^11.2.1", | ||
"mocha": "^4.0.1", | ||
"nyc": "^11.3.0", | ||
"prettier": "^1.7.4" | ||
@@ -46,0 +46,0 @@ }, |
@@ -9,4 +9,4 @@ const Group = require('./group') | ||
add(group_builder) { | ||
this._groupBuilders.push(group_builder) | ||
add(groupBuilder) { | ||
this._groupBuilders.push(groupBuilder) | ||
} | ||
@@ -13,0 +13,0 @@ |
@@ -7,3 +7,3 @@ const Regex = require('becke-ch--regex--s0-0-v1--base--pl--lib') | ||
this._re = 'string' === typeof regexp ? new RegExp(regexp) : regexp | ||
this._regex = new Regex(this._re) | ||
this._regex = new Regex(this._re.source, this._re.flags) | ||
@@ -10,0 +10,0 @@ const stack = [new GroupBuilder()] |
@@ -8,5 +8,6 @@ /* eslint-env mocha */ | ||
const tr = new TreeRegexp(/(a(?:b)?)(c)/) | ||
assert.deepEqual( | ||
tr.groupBuilder.children.map(gb => gb.source)[('a(?:b)?', 'c')] | ||
) | ||
assert.deepEqual(tr.groupBuilder.children.map(gb => gb.source), [ | ||
'a(?:b)?', | ||
'c', | ||
]) | ||
}) | ||
@@ -68,2 +69,8 @@ | ||
}) | ||
it('works with flags', () => { | ||
const tr = new TreeRegexp(/HELLO/i) | ||
const group = tr.match('hello') | ||
assert.equal(group.value, 'hello') | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2434
198856