2 * http://pettanr.sourceforge.jp/test/type.html
\r
8 isObject : function(v) {
\r
9 return v !== null && typeof v === 'object';
\r
12 isFunction : function(v) {
\r
13 return typeof v === 'function';
\r
16 X.UA.IE && X.UA.IE < 5 ? (function(v){ return v && typeof v.length === 'number';}) :
\r
17 window['Array'] ? (new Function('v', 'return v instanceof Array;')) :
\r
18 (function(v){ return Object.prototype.toString.call(v) === '[object Array]';}),
\r
19 isBoolean : function(v) {
\r
20 return typeof v === 'boolean';
\r
22 isString : function(v) {
\r
23 return typeof v === 'string';
\r
25 isNumber : function(v) {
\r
26 return typeof v === 'number';
\r
28 isFinite : function(v){
\r
29 return X.Type.isNumber(v) === true && isFinite(v);
\r
33 X.UA.IE && X.UA.IE < 5 ? (function(v){ return v && v.tagName && v.all;}) :
\r
34 window['HTMLElement'] ? (new Function('v', 'return v instanceof HTMLElement')) :
\r
35 (function(v){ return v && v.nodeType === 1 && v.appendChild;}),
\r
37 isElementCollection : function(v) {
\r
38 return (Object.prototype.toString.call(v) === "[object HTMLCollection]");
\r
41 isNull : function(v) {
\r
44 isUndefined : function(v) {
\r
45 return typeof v === 'undefined';
\r