intertype
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -117,2 +117,14 @@ (function() { | ||
}); | ||
this.declare('listiterator', (x) => { | ||
return (js_type_of(x)) === 'arrayiterator'; | ||
}); | ||
this.declare('textiterator', (x) => { | ||
return (js_type_of(x)) === 'stringiterator'; | ||
}); | ||
this.declare('setiterator', (x) => { | ||
return (js_type_of(x)) === 'setiterator'; | ||
}); | ||
this.declare('mapiterator', (x) => { | ||
return (js_type_of(x)) === 'mapiterator'; | ||
}); | ||
this.declare('callable', (x) => { | ||
@@ -119,0 +131,0 @@ var ref; |
@@ -1,2 +0,1 @@ | ||
// Generated by CoffeeScript 2.4.1 | ||
(function() { | ||
@@ -98,2 +97,8 @@ 'use strict'; | ||
R = 'list'; | ||
break; | ||
case 'arrayiterator': | ||
R = 'listiterator'; | ||
break; | ||
case 'stringiterator': | ||
R = 'textiterator'; | ||
} | ||
@@ -259,3 +264,1 @@ if (!(R in this.specs)) { | ||
}).call(this); | ||
//# sourceMappingURL=declaring.js.map |
@@ -33,3 +33,3 @@ (function() { | ||
this.js_type_of = function(x) { | ||
return ((Object.prototype.toString.call(x)).slice(8, -1)).toLowerCase(); | ||
return ((Object.prototype.toString.call(x)).slice(8, -1)).toLowerCase().replace(/\s+/g, ''); | ||
}; | ||
@@ -36,0 +36,0 @@ |
{ | ||
"name": "intertype", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "A JavaScript typechecker", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -346,6 +346,8 @@ | ||
* [X] implement `validate.value x` to check `x` is anything but a promise; also offer as `nowait` method | ||
* [X] implement `validate.immediate x` to check `x` is anything but a promise; also offer as `nowait` method | ||
(the counterpart to `await`) | ||
* [ ] **v4.x.x** type declarations should have keys `isa` (single test or list or object with tests), | ||
`default` (a value that represents initial value of a given type), `check` (like `isa` but for checks), | ||
`sample` (generate random values from the type's domain as done in Clojure `spec`) | ||
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
45
2428
353
220624