intertype
Advanced tools
Comparing version 0.105.1 to 0.106.0
@@ -224,7 +224,14 @@ (function() { | ||
isa: function(x) { | ||
return typeof x === 'function'; | ||
return (Object.prototype.toString.call(x)) === '[object Function]'; | ||
}, | ||
default: {} | ||
default: function() {} | ||
}); | ||
//......................................................................................................... | ||
declare.asyncfunction({ | ||
isa: function(x) { | ||
return (Object.prototype.toString.call(x)) === '[object AsyncFunction]'; | ||
}, | ||
default: function() {} | ||
}); | ||
//......................................................................................................... | ||
return null; | ||
@@ -231,0 +238,0 @@ }; |
{ | ||
"name": "intertype", | ||
"version": "0.105.1", | ||
"version": "0.106.0", | ||
"description": "A JavaScript typechecker", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -661,3 +661,11 @@ | ||
* **[–]** allow enumerations (list of values) | ||
* **[–]** allow declaration of non-settable items (useful for `cfg` objects that need pre-computed | ||
properties derived from user settings) | ||
* **[–]** turns out ordering of `or`ed terms matters when it shouldn't: | ||
* `isa.regex.or.nonempty.text 'x'`: `true` | ||
* `isa.regex.or.nonempty.text /x/`: `true` | ||
* `isa.nonempty.text.or.regex 'x'`: `true` | ||
* `isa.nonempty.text.or.regex /x/`: `false` (b/c of `nonempty` which is never `true` for `regex`es) | ||
## Is Done | ||
@@ -664,0 +672,0 @@ |
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
337209
1787
734