use Ox.contains
This commit is contained in:
parent
544e117cb3
commit
d5a2588a1e
2 changed files with 1 additions and 2 deletions
|
@ -65,7 +65,6 @@ Ox.identity = function(val) {
|
||||||
Ox.noop <f> Returns undefined and calls optional callback without arguments
|
Ox.noop <f> Returns undefined and calls optional callback without arguments
|
||||||
This can be used to combine a synchronous and an asynchronous code path.
|
This can be used to combine a synchronous and an asynchronous code path.
|
||||||
@*/
|
@*/
|
||||||
// IE 8 doesn't like `Ox.void`
|
|
||||||
Ox.noop = function(callback) {
|
Ox.noop = function(callback) {
|
||||||
Ox.isFunction(callback) && callback();
|
Ox.isFunction(callback) && callback();
|
||||||
};
|
};
|
|
@ -7,7 +7,7 @@ Ox.checkType <f> Throws a TypeError if a value is not of a given type
|
||||||
type <s|[s]> Type, or array of types
|
type <s|[s]> Type, or array of types
|
||||||
@*/
|
@*/
|
||||||
Ox.checkType = function(val, type) {
|
Ox.checkType = function(val, type) {
|
||||||
if (!Ox.in(Ox.makeArray(type), Ox.typeOf(val))) {
|
if (!Ox.contains(Ox.makeArray(type), Ox.typeOf(val))) {
|
||||||
throw new TypeError();
|
throw new TypeError();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue