ciena-frost / ember-frost-object-browser

See all of your objects! http://ciena-frost.github.io/ember-frost-object-browser/
MIT License
5 stars 22 forks source link

Open for review, do not merge yet. Redesign for object browser #91

Closed quincyle closed 7 years ago

quincyle commented 8 years ago

This project uses semver, please check the scope of this pr:

CHANGELOG

Resigned entire object browser.

rox163 commented 8 years ago

Could you update the changelog section in the PR description with a summarized list of changes?

dafortin commented 8 years ago

Should we use Ember.typeOf instead of typeof?

juwara0 commented 8 years ago

@dafortin - My vote is yes, use Ember.typeOf. It will return the same result across all browsers and includes a bit more detail. Here is what will be returned: http://emberjs.com/api/#method_typeOf

| 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 |

versus the Javascript typeof: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof

Undefined   "undefined"
Null    "object" (see below)
Boolean "boolean"
Number  "number"
String  "string"
Symbol (new in ECMAScript 2015) "symbol"
Host object (provided by the JS environment)    Implementation-dependent
Function object (implements [[Call]] in ECMA-262 terms) "function"
Any other object    "object"
sglanzer-deprecated commented 8 years ago

Agreed with @juwara0 - prefer Ember.typeOf

sglanzer-deprecated commented 8 years ago

@quincyle given the size and impact of this review I would like a scheduled formal review to be done. Please book 2-3 hours and confirm participation from at least 3 other team members. The participants should read through this code ahead of time and come prepared with notes.

rox163 commented 8 years ago

we may need a bithoundrc file for this repo to ignore all the snippet files that are reported as failures in bithound's lint