System.Type

Static Type
Location: igium / Igium.Web / System / System.Type
Examples: Igium.Web Examples

Static Methods

Method Test Description
System.Type.isUndefined(o): Boolean Y returns true if o is undefined, otherwise returns false
System.Type.isNU(o): Boolean Y returns true if o equals null or is undefined, otherwise returns false
System.Type.isString(o): Boolean Y returns true if o is a string, otherwise returns false; returns false for null and undefined values
System.Type.isFixedLengthString(o, charCount): Boolean Y returns true if o is a string and contains exactly charCount characters, otherwise returns false; returns false for null and undefined values
System.Type.isNumber(o): Boolean Y returns true if o is a finite number, otherwise returns false; returns false for null and undefined values
System.Type.isBoolean(o): Boolean Y returns true if o is a boolean, otherwise returns false; returns false for null and undefined values
System.Type.isObject(o): Boolean Y returns true if o is an object, otherwise returns false; returns false for null and undefined values; returns false for functions, arrays, dates, booleans, strings and numbers
System.Type.isInteger(o): Boolean Y returns true if o is a finite integer number, otherwise returns false; returns false for null and undefined values
System.Type.isArray(o): Boolean Y returns true if o is an array, otherwise returns false; returns false for null and undefined values
System.Type.isFunction(o): Boolean Y returns true if o is a function, otherwise returns false; returns false for null and undefined values
System.Type.isDate(o): Boolean Y returns true if o is a date, otherwise returns false; returns false for null and undefined values
System.Type.isValidDate(o): Boolean Y returns true if o is a valid date (i.e. o.toString != "Invalid Date"), otherwise returns false; returns false for null and undefined values
System.Type.isNaN(o): Boolean Y returns true if o is a number that is NaN, otherwise returns false; returns false for null and undefined values
System.Type.isInfinity(o): Boolean Y returns true if o is a number that is infinite, otherwise returns false; returns false for null and undefined values
- - -
System.Type.getNativeTypeName(o): String Y returns the name of known native types; throws an exception for unknown types; the possible return values for known types are: "null", "undefined", "String", "Number", "Boolean", "Array", "Object", "Function", "Date" (see the System.Type.* constants below)
System.Type.getNativeType(o): System.ENativeType Y returns the System.ENativeType enumeration value of known native types; throws an exception for unknown types
- - -
System.Type.__unitTest(): [String] n/a runs the type unit tests; returns a list of strings containing the test results

Constants

Field Value
System.Type.Null: String "null"
System.Type.Undefined: String "undefined"
System.Type.String: String "String"
System.Type.Number: String "Number"
System.Type.Boolean: String "Boolean"
System.Type.Array: String "Array"
System.Type.Object: String "Object"
System.Type.Function: String "Function"
System.Type.Date: String "Date"
System.Type.NaN: String "NaN"
System.Type.Infinity: String "Infinity"

NOTE: For an enumeration of the native JavaScript types, see System.ENativeType

Unit tests: FULL