Index: src/macros.py |
=================================================================== |
--- src/macros.py (revision 3334) |
+++ src/macros.py (working copy) |
@@ -79,11 +79,10 @@ |
macro IS_UNDEFINED(arg) = (typeof(arg) === 'undefined'); |
macro IS_NUMBER(arg) = (typeof(arg) === 'number'); |
macro IS_STRING(arg) = (typeof(arg) === 'string'); |
-macro IS_OBJECT(arg) = (typeof(arg) === 'object' || %_ClassOf(arg) == 'RegExp'); |
macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); |
+macro IS_OBJECT(arg) = (%_IsObject(arg)); |
macro IS_ARRAY(arg) = (%_IsArray(arg)); |
-# IS_FUNCTION uses %_ClassOf rather than typeof so as to exclude regexps. |
-macro IS_FUNCTION(arg) = (%_ClassOf(arg) === 'Function'); |
+macro IS_FUNCTION(arg) = (%_IsFunction(arg)); |
macro IS_REGEXP(arg) = (%_ClassOf(arg) === 'RegExp'); |
macro IS_DATE(arg) = (%_ClassOf(arg) === 'Date'); |
macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number'); |