typeOf.js 189 B

123456789
  1. /**
  2. * @desc 判断类型
  3. * @param {String,Array....} obj
  4. */
  5. var typeOf = function typeOf(obj) {
  6. return Object.prototype.toString.call(obj).slice(8, -1);
  7. };
  8. module.exports = typeOf;