[javascript]isArray

isArray

var isArray = function(target){
	return getTypeString(target) == 'array';
};
var getTypeString = function(target){
	if(target == null){
		return "null";
	}
	var toString = {}.toString;
	return (typeof target === "object" || typeof target === "function") ? toString.call(target).split(' ').pop().toLowerCase().replace(/\]/g,'') : typeof obj;
};