{"id":13806240,"url":"https://github.com/simonexmachina/ember-devtools","last_synced_at":"2025-12-12T03:43:22.212Z","repository":{"id":11261891,"uuid":"13664507","full_name":"simonexmachina/ember-devtools","owner":"simonexmachina","description":"A collection of useful Ember.js debugging functions.","archived":false,"fork":false,"pushed_at":"2019-07-17T00:56:01.000Z","size":145,"stargazers_count":159,"open_issues_count":2,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T06:57:25.669Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonexmachina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-18T00:15:37.000Z","updated_at":"2024-10-07T17:15:39.000Z","dependencies_parsed_at":"2022-09-08T08:10:20.136Z","dependency_job_id":null,"html_url":"https://github.com/simonexmachina/ember-devtools","commit_stats":null,"previous_names":["aexmachina/ember-devtools","aexmachina/ember-debug"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonexmachina%2Fember-devtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonexmachina%2Fember-devtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonexmachina%2Fember-devtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonexmachina%2Fember-devtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonexmachina","download_url":"https://codeload.github.com/simonexmachina/ember-devtools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248885345,"owners_count":21177623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T01:01:09.329Z","updated_at":"2025-10-06T08:45:17.811Z","avatar_url":"https://github.com/simonexmachina.png","language":"JavaScript","readme":"[\u003cimg align='right' alt='Build Status' src='https://travis-ci.org/aexmachina/ember-devtools.png'\u003e](https://travis-ci.org/aexmachina/ember-devtools)\n\n# ember-devtools\n\nA collection of useful functions for developing Ember apps. Best served from the console.\n\n## Usage\n\nember-devtools is an `Ember.Service` that is most useful when available in the devtools \nconsole. The simplest was access this from the console is using\na global variable (eww!) which can be defined in `config/environment.js`.\n\n```js\nvar ENV = {\n  'ember-devtools': {\n    global: true,\n    enabled: environment === 'development'\n  }\n}\n```\n\nSetting `global` will allow access to the `devTools` functions globally (eg. you can \nrun `routes()` in the console). If you'd prefer these functions to be under a prefix \nset `global: 'devTools'` for `devTools.routes()`.\n\nThe `enabled` option will enable the addon. By default, this addon will only be included in the `development` environment.\n\nAlternatively you can use `Ember.inject.service('ember-devtools')` or `appInstance.lookup('service:ember-devtools')`.\n\n## Functions\n\n### `app([name])`\n\nReturns the named application. `name` defaults to `main`.\n\n### `routes()`\n\nReturns the names of all routes.\n\n### `route([name])`\n\nReturns the named route. `name` defaults to the current route.\n\n### `router([name])`\n\nReturns the named router instance. `name` defaults to `main`.\n\n### `model([name])`\n\nReturns the model for the named controller. `name` defaults to the the current route.\n\n### `service(name)`\n\nPerforms a lookup for the named service in the `owner` (using `'service:' + name`).\n\n### `controller([name])`\n\nReturns the named controller. `name` defaults to the current route.\n\n### `log(promise[, property[, getEach]])`\n\nResolves the `promise` and logs the resolved value using `console.log`.\nAlso sets `window.$E` to the resolved value so you can access it in the dev\ntools console.\n\nIf `property` is specified then `$E.get(property)` will be logged.\n\nIf `getEach` is true then `$E.getEach(property)` will be logged.\n\n#### Examples:\n\n```\n\u003e log(store.find('organisation')) =\u003e undefined\n\u003e $E.get('length') =\u003e 3\n\u003e log(store.find('organisation'), 'length') =\u003e 3\n\u003e log(store.find('organisation'), 'name', true) =\u003e array of names\n```\n\n### `lookup(name)`\n\nPerforms a lookup for the named entry in the `owner`, which will in turn\nask its `resolver` if it's not found.\n\n### `resolveRegistration(name)`\n\nPerforms a lookup for the named factory in the `registry`.\n\n### `ownerNameFor(obj)`\n\nSearches the `owner` to find the name for the specified object (if any).\n\n### `inspect`\n\nDoes what it says, in a manner of speaking. Alias to `Ember.inspect`.\n\n### `logResolver(bool = true)`\n\nSwitch logging for the resolver on or off.\n\n### `logAll(bool = true)`\n\nSwitch logging for all the things on/off.\n\n### `logRenders()`\n\nLogs the rendering duration (in milliseconds) of each component, view and helper.\n\n### `globalize()`\n\nAttach all of these useful functions to the `window` object (eww!) - useful\nfor accessing in the console.\n\n### `getOwner(obj = this)`\n\nThe owner of the service or specified `obj`.\n\n### `config()`\n\nReturns the Application config\n\n## Properties\n\n### `owner`\n\nThe owner of the service. n.b. this is not globalised (to avoid conflict with `window.owner`), use `getOwner()` instead.\n \n### `store`\n\nThe Ember Data `Store`.\n\n### `typeMaps`\n\nThe Ember Data 'type map'.\n\n## Installation\n\n### Ember CLI\n\n\tnpm install ember-devtools --save-dev\n\n### Upgrading From v2.0\n\nember-devtools is now dependent on ember-cli.\n\n## Changelog\n\n- v6: `container` and `containerNameFor` are now `owner` and `ownerNameFor`\n","funding_links":[],"categories":["Packages","JavaScript"],"sub_categories":["Debugging / Profiling"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonexmachina%2Fember-devtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonexmachina%2Fember-devtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonexmachina%2Fember-devtools/lists"}