// 判断类型 function isType(type) { return function(obj) { return Object.prototype.toString.call(obj) === '[object ' + type + ']'; } }