Comparing version 0.3.3 to 0.3.4
@@ -172,3 +172,3 @@ var ret = require('ret'); | ||
function gen(token, groups, negate) { | ||
var groupNumber, stack, str, n, i, l, not; | ||
var stack, str, n, i, l, not; | ||
@@ -183,4 +183,4 @@ switch (token.type) { | ||
// Insert placeholder until group string is generated. | ||
if (token.remember) { | ||
groupNumber = groups.push(false) - 1; | ||
if (token.remember && token.groupNumber === undefined) { | ||
token.groupNumber = groups.push(null) - 1; | ||
} | ||
@@ -198,3 +198,3 @@ | ||
if (token.remember) { | ||
groups[groupNumber] = str; | ||
groups[token.groupNumber] = str; | ||
} | ||
@@ -335,2 +335,3 @@ return str; | ||
RandExp.sugar = function() { | ||
/* jshint freeze:false */ | ||
RegExp.prototype.gen = function() { | ||
@@ -337,0 +338,0 @@ return randexp(this); |
{ | ||
"name": "randexp", | ||
"description": "Create random strings that match a given regular expression.", | ||
"keywords": ["regex", "regexp", "regular expression", "random"], | ||
"version": "0.3.3", | ||
"keywords": ["regex", "regexp", "regular expression", "random", "test"], | ||
"version": "0.3.4", | ||
"homepage": "http://fent.github.io/randexp.js/", | ||
@@ -7,0 +7,0 @@ "repository": { |
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
13503
6
271