'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
|
||||
@*/
|
||||
Ox.isPrimitive = function(value) {
|
||||
var type = Ox.typeOf(value);
|
||||
return type == 'boolean' || type == 'number' || type == 'string';
|
||||
return Ox.contains(
|
||||
['boolean', 'null', 'number', 'string', 'undefined'], Ox.typeOf(value)
|
||||
);
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
Loading…
Reference in a new issue