'null' and 'undefined' are primitives, too
This commit is contained in:
parent
15f1463360
commit
8cd27bca2f
1 changed files with 3 additions and 2 deletions
|
@ -272,8 +272,9 @@ Ox.isPrimitive <f> Tests if a value is a primitive (boolean, number or string)
|
||||||
false
|
false
|
||||||
@*/
|
@*/
|
||||||
Ox.isPrimitive = function(value) {
|
Ox.isPrimitive = function(value) {
|
||||||
var type = Ox.typeOf(value);
|
return Ox.contains(
|
||||||
return type == 'boolean' || type == 'number' || type == 'string';
|
['boolean', 'null', 'number', 'string', 'undefined'], Ox.typeOf(value)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
|
Loading…
Reference in a new issue