Comparing version 0.0.8 to 0.0.9
@@ -333,6 +333,6 @@ // Load modules | ||
// Escape ^$.*+?=!:|\/()[]{} | ||
return string.replace(/[\^\$\.\*\+\?\=\!\:\|\\\/\(\)\[\]\{\}]/g, '\\$&'); | ||
// Escape ^$.*+-?=!:|\/()[]{}, | ||
return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&'); | ||
}; | ||
{ | ||
"name": "hoek", | ||
"description": "General purpose node utilities", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "contributors":[ |
@@ -97,4 +97,4 @@ var assert = require('assert'); | ||
it("should escape all special regular expression characters", function (done) { | ||
var a = hoek.escapeRegex('4^f$s.4*5+_?%=#!:@|~\\/`"(>)[<]d{}s,'); | ||
a.should.equal('4\\^f\\$s\\.4\\*5\\+_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s,'); | ||
var a = hoek.escapeRegex('4^f$s.4*5+-_?%=#!:@|~\\/`"(>)[<]d{}s,'); | ||
a.should.equal('4\\^f\\$s\\.4\\*5\\+\\-_\\?%\\=#\\!\\:@\\|~\\\\\\/`"\\(>\\)\\[<\\]d\\{\\}s\\,'); | ||
done(); | ||
@@ -101,0 +101,0 @@ }) |
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
15088