functionality
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -50,3 +50,3 @@ var Masquerade = require('./Masquerade.js'), | ||
if(Masquerade.match([mask], [value])) return next(); | ||
return next(true); | ||
return false; | ||
}).withToString(function() { | ||
@@ -53,0 +53,0 @@ return "Optional " + Masquerade.type(mask); |
{ | ||
"name": "functionality", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Simple function overloading for JavaScript", | ||
@@ -5,0 +5,0 @@ "author": "Sierra Softworks", |
@@ -50,2 +50,15 @@ var fn = require('../'); | ||
}); | ||
it('should not match arguments of a different type', function() { | ||
var f = fn.on(fn.opt(Number), function() { | ||
return false; | ||
}).or(function() { | ||
return true; | ||
}).compile(); | ||
f().should.be.false; | ||
f(1).should.be.false; | ||
f(10).should.be.false; | ||
f('10').should.be.true; | ||
}); | ||
}); | ||
@@ -52,0 +65,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
31184
576