function(v){
  var ots = Object.prototype.toString;
  var s=typeof v;
    if(s=='object'){
      if(v){
        if((ots.call(v).indexOf('HTML')!==-1 && ots.call(v).indexOf('Element')!=-1)){return 'element'}
        if(v instanceof Array||(!(v instanceof Object)&&(ots.call(v)=='[object Array]')||typeof v.length=='number'&&typeof v.splice!='undefined'&&typeof v.propertyIsEnumerable!='undefined'&&!v.propertyIsEnumerable('splice'))){return 'array'}
        if(!(v instanceof Object)&&(ots.call(v)=='[object Function]'|| typeof v.call!='undefined'&& typeof v.propertyIsEnumerable!='undefined'&&!v.propertyIsEnumerable('call'))){return 'function'}
      }
      return 'null';
    }
    else if(s=='function'&&typeof v.call=='undefined'){return 'object'}
  return s;
}
function(v){
  var ots = Object.prototype.toString;
  var s=typeof v;
    if(s=='object'){
      if(v){
        if((ots.call(v).indexOf('HTML')!==-1 && ots.call(v).indexOf('Element')!=-1)){return 'element'}
        if(v instanceof Array||(!(v instanceof Object)&&(ots.call(v)=='[object Array]')||typeof v.length=='number'&&typeof v.splice!='undefined'&&typeof v.propertyIsEnumerable!='undefined'&&!v.propertyIsEnumerable('splice'))){return 'array'}
        if(!(v instanceof Object)&&(ots.call(v)=='[object Function]'|| typeof v.call!='undefined'&& typeof v.propertyIsEnumerable!='undefined'&&!v.propertyIsEnumerable('call'))){return 'function'}
      }
      return 'null';
    }
    else if(s=='function'&&typeof v.call=='undefined'){return 'object'}
  return s;
}
function ( v ) { var ots = Object . prototype . toString ; var s = typeof v ; if ( s == 'object' ) { if ( v ) { if ( ( ots . call ( v ) . indexOf ( 'HTML' ) !== - 1 && ots . call ( v ) . indexOf ( 'Element' ) != - 1 ) ) { return 'element' } if ( v instanceof Array || ( ! ( v instanceof Object ) && ( ots . call ( v ) == '[object Array]' ) || typeof v . length == 'number' && typeof v . splice != 'undefined' && typeof v . propertyIsEnumerable != 'undefined' && ! v . propertyIsEnumerable ( 'splice' ) ) ) { return 'array' } if ( ! ( v instanceof Object ) && ( ots . call ( v ) == '[object Function]' || typeof v . call != 'undefined' && typeof v . propertyIsEnumerable != 'undefined' && ! v . propertyIsEnumerable ( 'call' ) ) ) { return 'function' } } return 'null' ; } else if ( s == 'function' && typeof v . call == 'undefined' ) { return 'object' } return s ; }
private methods for detecting datatypes
private methods for detecting datatypes