Ember.js - What purpose does Ember.lookup serve

ember.js

Solution

`Ember.lookup` was introduced along with `Ember.imports` and `Ember.exports` as a way to remove the dependency on `window`.

If you are running Ember in the browser, all three values will refer to the `window`, however if you are running without the browser, for instance, through NodeJS or with AMD, you will need to supply values yourself.

See the commit message for more information.

Problem

Can anyone tell me what purpose Ember.lookup serves? It is used to lookup string keys. An example of its use in the ember source is: ``` if(typeof modelType === "string"){ return Ember.get(Ember.lookup, modelType); } else { return modelType; } ``` I can see that it returns a type from a string but I don't see where it is set or what the bigger picture is for its usage.

Original source