intertype
Advanced tools
Comparing version 0.116.0 to 0.117.0
(function() { | ||
//----------------------------------------------------------------------------------------------------------- | ||
var GUY; | ||
GUY = require('guy'); | ||
//----------------------------------------------------------------------------------------------------------- | ||
this._provisional_declare_basic_types = function(hub) { | ||
@@ -254,2 +259,11 @@ var declare; | ||
//......................................................................................................... | ||
declare.knowntype({ | ||
isa: function(x) { | ||
if (!((this.isa.text(x)) && (x.length > 0))) { | ||
return false; | ||
} | ||
return GUY.props.has(this.registry, x); | ||
} | ||
}); | ||
//......................................................................................................... | ||
return null; | ||
@@ -256,0 +270,0 @@ }; |
{ | ||
"name": "intertype", | ||
"version": "0.116.0", | ||
"version": "0.117.0", | ||
"description": "A JavaScript typechecker", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -26,2 +26,3 @@ | ||
- [Intertype `is_extension_of()`](#intertype-is_extension_of) | ||
- [Intertype Meta-Type `knowntype`](#intertype-meta-type-knowntype) | ||
- [To Do](#to-do) | ||
@@ -502,2 +503,8 @@ - [Is Done](#is-done) | ||
## Intertype Meta-Type `knowntype` | ||
* used to test whether a given value is registered as type, as in `types.isa.knowntype 'foobar'` | ||
* tests unconditionally `false` unless argument is a non-empty string | ||
* otherwise, tests whether argument is key of `types.registry` | ||
## To Do | ||
@@ -504,0 +511,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
363579
1958
762