ExtJs -- 14 -- Ext. typeOf () is very similar to typeof in javascript, but it simply expands the type. In fact, you can understand the source code directly. javascripttypeof
Ext. typeOf () // Ext. typeOf () is very similar to typeof in javascript, but it only performs a simple extension on the type. In fact, you can directly view the source code to understand it. // typeOf: function (value) {// var type, // typeToString; // if (value = null) {// return 'null '; ///} // type = typeof value; /// if (type = 'undefined' | type = 'string' | type = 'number' | type = 'boolean') {// return type; //} // typeToString = toString. call (value); // switch (typeToString) {// c Ase '[object Array]': // return 'array'; // case '[object Date]': // return 'date '; // case '[ object Boolean] ': // return 'boolean'; // case '[ object Number]': // return 'number '; // case '[object RegExp]': // return 'regexp '; //} // if (type = 'function ') {// return 'function'; //} // if (type = 'object') {// if (value. nodeType! = Undefined) {// if (value. nodeType = 3) {// return (/\ S/). test (value. nodeValue )? 'Textnode': 'whitspace'; //} // else {// return 'element'; //} // return 'object '; ///} // <debug error>/Ext. error. raise ({// sourceClass: 'ext ', // sourceMethod: 'typeof', // msg: 'failed' to determine the type of the specified value "'+ value + '". this is most likely a bug. '//}); // </debug> //} // Ext. typeOf () and Ext. similarities and Differences of type () // The following is the source code // Ext. type = Ext. typeOf;