public/lib/emberjs/ember.js
function typeOf(item) {
      var ret, modulePath;

      // ES6TODO: Depends on Ember.Object which is defined in runtime.
      if (typeof EmberObject === "undefined") {
        modulePath = 'ember-runtime/system/object';
        if (Ember.__loader.registry[modulePath]) {
          EmberObject = Ember.__loader.require(modulePath)['default'];
        }
      }

      ret = (item === null || item === undefined) ? String(item) : TYPE_MAP[toString.call(item)] || 'object';

      if (ret === 'function') {
        if (EmberObject && EmberObject.detect(item)) ret = 'class';
      } else if (ret === 'object') {
        if (item instanceof Error) ret = 'error';
        else if (EmberObject && item instanceof EmberObject) ret = 'instance';
        else if (item instanceof Date) ret = 'date';
      }

      return ret;
    }
function typeOf(item) {
      var ret, modulePath;

      // ES6TODO: Depends on Ember.Object which is defined in runtime.
      if (typeof EmberObject === "undefined") {
        modulePath = 'ember-runtime/system/object';
        if (Ember.__loader.registry[modulePath]) {
          EmberObject = Ember.__loader.require(modulePath)['default'];
        }
      }

      ret = (item === null || item === undefined) ? String(item) : TYPE_MAP[toString.call(item)] || 'object';

      if (ret === 'function') {
        if (EmberObject && EmberObject.detect(item)) ret = 'class';
      } else if (ret === 'object') {
        if (item instanceof Error) ret = 'error';
        else if (EmberObject && item instanceof EmberObject) ret = 'instance';
        else if (item instanceof Date) ret = 'date';
      }

      return ret;
    }
function typeOf ( item ) { var ret , modulePath ; // ES6TODO: Depends on Ember.Object which is defined in runtime. if ( typeof EmberObject === "undefined" ) { modulePath = 'ember-runtime/system/object' ; if ( Ember . __loader . registry [ modulePath ] ) { EmberObject = Ember . __loader . require ( modulePath ) [ 'default' ] ; } } ret = ( item === null || item === undefined ) ? String ( item ) : TYPE_MAP [ toString . call ( item ) ] || 'object' ; if ( ret === 'function' ) { if ( EmberObject && EmberObject . detect ( item ) ) ret = 'class' ; } else if ( ret === 'object' ) { if ( item instanceof Error ) ret = 'error' ; else if ( EmberObject && item instanceof EmberObject ) ret = 'instance' ; else if ( item instanceof Date ) ret = 'date' ; } return ret ; }
Returns a consistent type for the passed item.

Use this instead of the built-in `typeof` to get the type of an item.
It will return the same result across all browsers and includes a bit
more detail. Here is what will be returned:

| Return Value  | Meaning                                              |
|---------------|------------------------------------------------------|
| 'string'      | String primitive or String object.                   |
| 'number'      | Number primitive or Number object.                   |
| 'boolean'     | Boolean primitive or Boolean object.                 |
| 'null'        | Null value                                           |
| 'undefined'   | Undefined value                                      |
| 'function'    | A function                                           |
| 'array'       | An instance of Array                                 |
| 'regexp'      | An instance of RegExp                                |
| 'date'        | An instance of Date                                  |
| 'class'       | An Ember class (created using Ember.Object.extend()) |
| 'instance'    | An Ember object instance                             |
| 'error'       | An instance of the Error object                      |
| 'object'      | A JavaScript object not inheriting from Ember.Object |

Examples:

```javascript
Ember.typeOf();                       // 'undefined'
Ember.typeOf(null);                   // 'null'
Ember.typeOf(undefined);              // 'undefined'
Ember.typeOf('michael');              // 'string'
Ember.typeOf(new String('michael'));  // 'string'
Ember.typeOf(101);                    // 'number'
Ember.typeOf(new Number(101));        // 'number'
Ember.typeOf(true);                   // 'boolean'
Ember.typeOf(new Boolean(true));      // 'boolean'
Ember.typeOf(Ember.makeArray);        // 'function'
Ember.typeOf([1, 2, 90]);             // 'array'
Ember.typeOf(/abc/);                  // 'regexp'
Ember.typeOf(new Date());             // 'date'
Ember.typeOf(Ember.Object.extend());  // 'class'
Ember.typeOf(Ember.Object.create());  // 'instance'
Ember.typeOf(new Error('teamocil'));  // 'error'

'normal' JavaScript object
Ember.typeOf({ a: 'b' });             // 'object'
```

@method typeOf
@for Ember
@param {Object} item the item to check
@return {String} the type
Returns a consistent type for the passed item .