new DataType()
Includes constants and mthods about data types.
- Source:
Members
-
(static) ARRAY
-
Array
- Source:
-
(static) BOOL
-
Boolean.
- Source:
-
(static) BOOLEAN
-
Boolean. same as DataType.BOOL
- Source:
-
(static) CLASS
-
A CLASS
- Source:
-
(static) DATE
-
Hash
- Source:
-
(static) FLOAT
-
Explicit float number.
- Source:
-
(static) FUNCTION
-
Function
- Source:
-
(static) INT
-
Explicit integer number.
- Source:
-
(static) INTEGER
-
Explicit integer number, same as DataType.INT
- Source:
-
(static) NUMBER
-
Number.
- Source:
-
(static) OBJECT
-
A normal JavaScript object.
- Source:
-
(static) OBJECTEX
-
Object extended from ObjectEx
- Source:
-
(static) PRIMARY
-
Basic data type, including string, number and boolean.
- Source:
-
(static) STRING
-
String
- Source:
-
(static) UNDEFINED
-
type of JS const undefined
- Source:
-
(static) UNKNOWN
-
Unknown data type, same as DataType.VARIANT.
- Source:
-
(static) VARIANT
-
Variant data type, same as DataType.UNKNOWN.
- Source:
Methods
-
(static) createInstance(typeName) → {Variant}
-
Create an instance of typeName
Parameters:
Name Type Description typeName
String - Source:
Returns:
- Type
- Variant
-
(static) getType(value) → {String}
-
Get value type and returns a data type string.
Parameters:
Name Type Description value
Variant - Source:
Returns:
- Type
- String
-
(static) isComplexType(typeName) → {Bool}
-
Returns whether a type name is object, array or objectex
Parameters:
Name Type Description typeName
String - Source:
Returns:
- Type
- Bool
-
(static) isDateType(typeName) → {Bool}
-
Returns whether a type name is Date.
Parameters:
Name Type Description typeName
String - Source:
Returns:
- Type
- Bool
-
(static) isFunctionType(typeName) → {Bool}
-
Returns whether a type name is function.
Parameters:
Name Type Description typeName
String - Source:
Returns:
- Type
- Bool
-
(static) isObjectExType(typeName) → {Bool}
-
Returns whether a type name is ObjectEx.
Parameters:
Name Type Description typeName
String - Source:
Returns:
- Type
- Bool
-
(static) isObjectType(typeName) → {Bool}
-
Returns whether a type name is object. NOTE: this function does not distinguish array.
Parameters:
Name Type Description typeName
String - Source:
Returns:
- Type
- Bool
-
(static) isSimpleType(typeName) → {Bool}
-
Returns whether a type name is string, number or boolean
Parameters:
Name Type Description typeName
String - Source:
Returns:
- Type
- Bool