function(obj) {
		if(obj === null) { return 'null'; }

		if(obj === undefined) { return 'undefined'; }

		var ret = Object.prototype.toString.call(obj).match(/^\[object\s+(.*?)\]$/)[1];

		ret = ret? ret.toLowerCase() : '';

		if(ret == 'number' && isNaN(obj)) {
			return 'NaN';
		}

		return ret;
	}
function(obj) {
		if(obj === null) { return 'null'; }

		if(obj === undefined) { return 'undefined'; }

		var ret = Object.prototype.toString.call(obj).match(/^\[object\s+(.*?)\]$/)[1];

		ret = ret? ret.toLowerCase() : '';

		if(ret == 'number' && isNaN(obj)) {
			return 'NaN';
		}

		return ret;
	}
function ( obj ) { if ( obj === null ) { return 'null' ; } if ( obj === undefined ) { return 'undefined' ; } var ret = Object . prototype . toString . call ( obj ) . match ( / ^\[object\s+(.*?)\]$ / ) [ 1 ] ; ret = ret ? ret . toLowerCase ( ) : '' ; if ( ret == 'number' && isNaN ( obj ) ) { return 'NaN' ; } return ret ; }
Returns the [[Class]] of an object in lowercase (eg. array, date, regexp, string etc)
Caution: Results for DOM elements and collections aren't reliable.
@param {Object} obj

@return {String}
Returns the [[ Class ]] of an object in lowercase ( eg . array date regexp string etc ) Caution : Results for DOM elements and collections aren t reliable . @param { Object } obj
Returns the type of obj