NaN
is a primitive Number value, and the Ember.typeOf
doc says 'number'
represents “Number primitive or Number object”.
The current behaviour means Ember.typeOf(parseInt(someValue))
always yields the same result, although I don’t have an example where this would be useful.
So, I second your question. Ember.typeOf
returns 'null'
and 'undefined'
where appropriate, so I think it would be consistent for Ember.typeOf(NaN) === 'NaN'
, since this method gives finer distinctions to the types it detects.