code: function typeOf(obj) {
          if (obj === undefined) {
              return 'undefined';
          }
  
          if (obj === null) {
              return 'null';
          }
  
          var t = Object.prototype.toString.call(obj).match(/\s([a-z|A-Z]+)/)[1].toLowerCase(),
              m;
  
          if (t !== 'object') {
              return t;
          }
  
          m = obj.constructor.toString().match(/^function\s*([$A-Z_][0-9A-Z_$]*)/i);
          if (m === null) {
              return 'object';
          }
  
          return m[1];
      }
docs: /*global define 
  Detects the type of the passed object
  
  @param {Any} obj object to find the type of
  @memberOf type
  @return {String} type of the passed object