intertype
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -116,12 +116,12 @@ // Generated by CoffeeScript 2.4.1 | ||
this.declare('empty', function(x) { | ||
return (this.size_of(x)) === 0; | ||
return (this.has_size(x)) && (this.size_of(x)) === 0; | ||
}); | ||
this.declare('singular', function(x) { | ||
return (this.size_of(x)) === 1; | ||
return (this.has_size(x)) && (this.size_of(x)) === 1; | ||
}); | ||
this.declare('nonempty', function(x) { | ||
return (this.size_of(x)) > 0; | ||
return (this.has_size(x)) && (this.size_of(x)) > 0; | ||
}); | ||
this.declare('plural', function(x) { | ||
return (this.size_of(x)) > 1; | ||
return (this.has_size(x)) && (this.size_of(x)) > 1; | ||
}); | ||
@@ -128,0 +128,0 @@ this.declare('nonempty_text', function(x) { |
@@ -88,4 +88,10 @@ // Generated by CoffeeScript 2.4.1 | ||
//----------------------------------------------------------------------------------------------------------- | ||
this.has_size = function(x) { | ||
var ref; | ||
return this.isa.function((ref = this.specs[this.type_of(x)]) != null ? ref.size : void 0); | ||
}; | ||
}).call(this); | ||
//# sourceMappingURL=sizing.js.map |
@@ -194,3 +194,3 @@ // Generated by CoffeeScript 2.4.1 | ||
//......................................................................................................... | ||
probes_and_matchers = [[123, ["count", "finite", "frozen", "integer", "nonnegative", "notunset", "number", "numeric", "odd", "positive", "safeinteger", "sealed", "truthy"], null], [124, ["count", "even", "finite", "frozen", "integer", "nonnegative", "notunset", "number", "numeric", "positive", "safeinteger", "sealed", "truthy"], null], [0, ["count", "even", "falsy", "finite", "frozen", "integer", "nonnegative", "nonpositive", "notunset", "number", "numeric", "safeinteger", "sealed", "zero"], null], [true, ["boolean", "frozen", "notunset", "odd", "sealed", "truthy"], null], [null, ["falsy", "frozen", "null", "odd", "sealed", "unset"], null], [void 0, ["falsy", "frozen", "odd", "sealed", "undefined", "unset"], null], [{}, ["extensible", "notunset", "object", "odd", "truthy"], null], [[], ["extensible", "list", "notunset", "odd", "truthy"], null]]; | ||
probes_and_matchers = [[123, ["count", "finite", "frozen", "integer", "nonnegative", "notunset", "number", "numeric", "odd", "positive", "safeinteger", "sealed", "truthy"], null], [124, ["count", "even", "finite", "frozen", "integer", "nonnegative", "notunset", "number", "numeric", "positive", "safeinteger", "sealed", "truthy"], null], [0, ["count", "even", "falsy", "finite", "frozen", "integer", "nonnegative", "nonpositive", "notunset", "number", "numeric", "safeinteger", "sealed", "zero"], null], [true, ["boolean", "frozen", "notunset", "odd", "sealed", "truthy"], null], [null, ["falsy", "frozen", "null", "odd", "sealed", "unset"], null], [void 0, ["falsy", "frozen", "odd", "sealed", "undefined", "unset"], null], [{}, ["empty", "extensible", "notunset", "object", "odd", "truthy"], null], [[], ["empty", "extensible", "list", "notunset", "odd", "truthy"], null]]; | ||
//......................................................................................................... | ||
@@ -393,3 +393,3 @@ // debug intersection_of [ 1, 2, 3, ], [ 'a', 3, 1, ] | ||
test(this); | ||
(function() { // test @[ "validate" ] | ||
(function() { // test @[ "types_of" ] | ||
@@ -582,10 +582,10 @@ // do -> debug ( require '../helpers' ).js_type_of arguments | ||
help(types_of(42)); | ||
return help(types_of(new Number(42))); | ||
help(types_of(new Number(42))); | ||
// help validate.multiple_of 3, 4 | ||
return debug('µ12233', types_of([])); | ||
})(); | ||
} | ||
// help validate.multiple_of 3, 4 | ||
}).call(this); | ||
//# sourceMappingURL=main.test.js.map |
{ | ||
"name": "intertype", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"description": "A JavaScript typechecker", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
231631
1445