Comparing version 0.1.7 to 0.2.0
@@ -51,4 +51,4 @@ /// <reference path="../node.d.ts" /> | ||
if (typeof message === "undefined") { message = 'not-valid-ipv4'; } | ||
var p1 = "([1-9]|1[0-9][0-9]?|2[0-4][0-9]|25[0-4])"; | ||
var p2 = "([0-9]|1[0-9][0-9]?|2[0-4][0-9]|25[0-4])"; | ||
var p1 = "([1-9][0-9]?|1[0-9][0-9]?|2[0-4][0-9]|25[0-4])"; | ||
var p2 = "([0-9][0-9]?|1[0-9][0-9]?|2[0-4][0-9]|25[0-4])"; | ||
return exports.match("^" + [p1, p2, p2, p1].join("\\.") + "$", "", message); | ||
@@ -55,0 +55,0 @@ } |
@@ -13,3 +13,3 @@ { | ||
], | ||
"version" : "0.1.7", | ||
"version" : "0.2.0", | ||
"license" : "MIT", | ||
@@ -26,6 +26,6 @@ "repository" : "http://github.com/dresende/node-enforce.git", | ||
"devDependencies": { | ||
"mocha" : "1.12.1", | ||
"should" : "1.2.2", | ||
"mocha" : "^10.4.0", | ||
"should" : "^13.2.3", | ||
"typescript" : ">= 0.9.1" | ||
} | ||
} |
@@ -9,3 +9,3 @@ var should = require("should"); | ||
it("should have .ifDefined()", function (done) { | ||
validator.ifDefined.should.be.a("function"); | ||
validator.ifDefined.should.be.of.type("function"); | ||
@@ -15,3 +15,3 @@ return done(); | ||
it("should have .ifNotEmptyString()", function (done) { | ||
validator.ifNotEmptyString.should.be.a("function"); | ||
validator.ifNotEmptyString.should.be.of.type("function"); | ||
@@ -21,3 +21,3 @@ return done(); | ||
it("should have .ifType()", function (done) { | ||
validator.ifType.should.be.a("function"); | ||
validator.ifType.should.be.of.type("function"); | ||
@@ -27,3 +27,3 @@ return done(); | ||
it("should have .ifNotType()", function (done) { | ||
validator.ifNotType.should.be.a("function"); | ||
validator.ifNotType.should.be.of.type("function"); | ||
@@ -30,0 +30,0 @@ return done(); |
@@ -7,3 +7,3 @@ var should = require("should"); | ||
it("should have .required()", function (done) { | ||
enforce.required.should.be.a("function"); | ||
enforce.required.should.be.of.type("function"); | ||
@@ -13,3 +13,3 @@ return done(); | ||
it("should have .notEmptyString()", function (done) { | ||
enforce.notEmptyString.should.be.a("function"); | ||
enforce.notEmptyString.should.be.of.type("function"); | ||
@@ -19,3 +19,3 @@ return done(); | ||
it("should have .sameAs()", function (done) { | ||
enforce.sameAs.should.be.a("function"); | ||
enforce.sameAs.should.be.of.type("function"); | ||
@@ -25,3 +25,3 @@ return done(); | ||
it("should have a chainable .ifDefined() function", function (done) { | ||
enforce.required().ifDefined.should.be.a("function"); | ||
enforce.required().ifDefined.should.be.of.type("function"); | ||
@@ -28,0 +28,0 @@ return done(); |
@@ -7,3 +7,3 @@ var should = require("should"); | ||
it("should be a function", function (done) { | ||
enforce.Enforce.should.be.a("function"); | ||
enforce.Enforce.should.be.of.type("function"); | ||
@@ -15,4 +15,4 @@ return done(); | ||
checks.add.should.be.a("function"); | ||
checks.check.should.be.a("function"); | ||
checks.add.should.be.of.type("function"); | ||
checks.check.should.be.of.type("function"); | ||
@@ -43,3 +43,3 @@ return done(); | ||
it("should have the .add() method", function (done) { | ||
checks.add.should.be.a('function'); | ||
checks.add.should.be.of.type('function'); | ||
done(); | ||
@@ -89,3 +89,3 @@ }); | ||
it("should have a .clear() method", function (done) { | ||
checks.clear.should.be.a("function"); | ||
checks.clear.should.be.of.type("function"); | ||
done(); | ||
@@ -92,0 +92,0 @@ }); |
@@ -7,3 +7,3 @@ var should = require("should"); | ||
it("should have .inside()", function (done) { | ||
enforce.lists.inside.should.be.a("function"); | ||
enforce.lists.inside.should.be.of.type("function"); | ||
@@ -13,3 +13,3 @@ return done(); | ||
it("should have .outside()", function (done) { | ||
enforce.lists.outside.should.be.a("function"); | ||
enforce.lists.outside.should.be.of.type("function"); | ||
@@ -16,0 +16,0 @@ return done(); |
@@ -7,3 +7,3 @@ var should = require("should"); | ||
it("should have .match()", function (done) { | ||
enforce.patterns.match.should.be.a("function"); | ||
enforce.patterns.match.should.be.of.type("function"); | ||
@@ -13,3 +13,3 @@ return done(); | ||
it("should have .hexString()", function (done) { | ||
enforce.patterns.hexString.should.be.a("function"); | ||
enforce.patterns.hexString.should.be.of.type("function"); | ||
@@ -19,3 +19,3 @@ return done(); | ||
it("should have .email()", function (done) { | ||
enforce.patterns.email.should.be.a("function"); | ||
enforce.patterns.email.should.be.of.type("function"); | ||
@@ -25,3 +25,3 @@ return done(); | ||
it("should have .ipv4()", function (done) { | ||
enforce.patterns.ipv4.should.be.a("function"); | ||
enforce.patterns.ipv4.should.be.of.type("function"); | ||
@@ -31,3 +31,3 @@ return done(); | ||
it("should have .ipv6()", function (done) { | ||
enforce.patterns.ipv6.should.be.a("function"); | ||
enforce.patterns.ipv6.should.be.of.type("function"); | ||
@@ -37,3 +37,3 @@ return done(); | ||
it("should have .mac()", function (done) { | ||
enforce.patterns.mac.should.be.a("function"); | ||
enforce.patterns.mac.should.be.of.type("function"); | ||
@@ -43,3 +43,3 @@ return done(); | ||
it("should have .uuid3()", function (done) { | ||
enforce.patterns.uuid3.should.be.a("function"); | ||
enforce.patterns.uuid3.should.be.of.type("function"); | ||
@@ -49,3 +49,3 @@ return done(); | ||
it("should have .uuid4()", function (done) { | ||
enforce.patterns.uuid4.should.be.a("function"); | ||
enforce.patterns.uuid4.should.be.of.type("function"); | ||
@@ -52,0 +52,0 @@ return done(); |
@@ -7,3 +7,3 @@ var should = require("should"); | ||
it("should have .number()", function (done) { | ||
enforce.ranges.number.should.be.a("function"); | ||
enforce.ranges.number.should.be.of.type("function"); | ||
@@ -13,3 +13,3 @@ return done(); | ||
it("should have .length()", function (done) { | ||
enforce.ranges.length.should.be.a("function"); | ||
enforce.ranges.length.should.be.of.type("function"); | ||
@@ -16,0 +16,0 @@ return done(); |
@@ -7,3 +7,3 @@ var should = require("should"); | ||
it("should have .password()", function (done) { | ||
enforce.security.password.should.be.a("function"); | ||
enforce.security.password.should.be.of.type("function"); | ||
@@ -10,0 +10,0 @@ return done(); |
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
136619
31