ember-source 4.0.0-beta.2 → 4.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/data.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "The Ember API",
4
4
  "description": "The Ember API: a framework for building ambitious web applications",
5
5
  "url": "https://emberjs.com/",
6
- "version": "4.0.0-beta.2"
6
+ "version": "4.0.0-beta.6"
7
7
  },
8
8
  "files": {
9
9
  "node_modules/rsvp/lib/rsvp/promise/all.js": {
@@ -8922,7 +8922,7 @@
8922
8922
  },
8923
8923
  {
8924
8924
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
8925
- "line": 247,
8925
+ "line": 248,
8926
8926
  "description": "Returns `true` if `routeName/models/queryParams` is the active route, where `models` and `queryParams` are optional.\nSee [model](api/ember/release/classes/Route/methods/model?anchor=model) and\n[queryParams](/api/ember/3.7/classes/Route/properties/queryParams?anchor=queryParams) for more information about these arguments.\n\nIn the following example, `isActive` will return `true` if the current route is `/posts`.\n\n```app/components/posts.js\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n\n displayComments() {\n return this.router.isActive('posts');\n }\n});\n```\n\nThe next example includes a dynamic segment, and will return `true` if the current route is `/posts/1`,\nassuming the post has an id of 1:\n\n```app/components/posts.js\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n\n displayComments(post) {\n return this.router.isActive('posts', post.id);\n }\n});\n```\n\nWhere `post.id` is the id of a specific post, which is represented in the route as /posts/[post.id].\nIf `post.id` is equal to 1, then isActive will return true if the current route is /posts/1, and false if the route is anything else.",
8927
8927
  "itemtype": "method",
8928
8928
  "name": "isActive",
@@ -8955,7 +8955,7 @@
8955
8955
  },
8956
8956
  {
8957
8957
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
8958
- "line": 344,
8958
+ "line": 345,
8959
8959
  "description": "Takes a string URL and returns a `RouteInfo` for the leafmost route represented\nby the URL. Returns `null` if the URL is not recognized. This method expects to\nreceive the actual URL as seen by the browser including the app's `rootURL`.\n\nSee [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n\nIn the following example `recognize` is used to verify if a path belongs to our\napplication before transitioning to it.\n\n```\nimport Component from '@ember/component';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Component {\n @service router;\n path = '/';\n\n click() {\n if (this.router.recognize(this.path)) {\n this.router.transitionTo(this.path);\n }\n }\n}\n```",
8960
8960
  "itemtype": "method",
8961
8961
  "name": "recognize",
@@ -8973,7 +8973,7 @@
8973
8973
  },
8974
8974
  {
8975
8975
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
8976
- "line": 383,
8976
+ "line": 385,
8977
8977
  "description": "Takes a string URL and returns a promise that resolves to a\n`RouteInfoWithAttributes` for the leafmost route represented by the URL.\nThe promise rejects if the URL is not recognized or an unhandled exception\nis encountered. This method expects to receive the actual URL as seen by\nthe browser including the app's `rootURL`.",
8978
8978
  "itemtype": "method",
8979
8979
  "name": "recognizeAndLoad",
@@ -8991,8 +8991,8 @@
8991
8991
  },
8992
8992
  {
8993
8993
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
8994
- "line": 403,
8995
- "description": "The `routeWillChange` event is fired at the beginning of any\nattempted transition with a `Transition` object as the sole\nargument. This action can be used for aborting, redirecting,\nor decorating the transition from the currently active routes.\n\nA good example is preventing navigation when a form is\nhalf-filled out:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeWillChange', (transition) => {\n if (!transition.to.find(route => route.name === this.routeName)) {\n alert(\"Please save or cancel your changes.\");\n transition.abort();\n }\n })\n }\n}\n```\n\nThe `routeWillChange` event fires whenever a new route is chosen as the desired target of a transition. This includes `transitionTo`, `replaceWith`, all redirection for any reason including error handling, and abort. Aborting implies changing the desired target back to where you already were. Once a transition has completed, `routeDidChange` fires.",
8994
+ "line": 406,
8995
+ "description": "The `routeWillChange` event is fired at the beginning of any\nattempted transition with a `Transition` object as the sole\nargument. This action can be used for aborting, redirecting,\nor decorating the transition from the currently active routes.\n\nA good example is preventing navigation when a form is\nhalf-filled out:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeWillChange', (transition) => {\n if (!transition.to.find(route => route.name === this.routeName)) {\n alert(\"Please save or cancel your changes.\");\n transition.abort();\n }\n })\n }\n}\n```\n\nThe `routeWillChange` event fires whenever a new route is chosen as the desired target of a transition. This includes `transitionTo`, `replaceWith`, all redirection for any reason including error handling, and abort. Aborting implies changing the desired target back to where you already were. Once a transition has completed, `routeDidChange` fires.",
8996
8996
  "itemtype": "event",
8997
8997
  "name": "routeWillChange",
8998
8998
  "params": [
@@ -9009,8 +9009,8 @@
9009
9009
  },
9010
9010
  {
9011
9011
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
9012
- "line": 440,
9013
- "description": "The `routeDidChange` event only fires once a transition has settled.\nThis includes aborts and error substates. Like the `routeWillChange` event\nit receives a Transition as the sole argument.\n\nA good example is sending some analytics when the route has transitioned:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { action } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeDidChange', (transition) => {\n ga.send('pageView', {\n current: transition.to.name,\n from: transition.from.name\n });\n })\n }\n}\n```\n\n`routeDidChange` will be called after any `Route`'s\n[didTransition](/ember/release/classes/Route/events/didTransition?anchor=didTransition)\naction has been fired.\nThe updates of properties\n[currentURL](/ember/release/classes/RouterService/properties/currentURL?anchor=currentURL),\n[currentRouteName](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRouteName)\nand\n[currentRoute](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRoute)\nare completed at the time `routeDidChange` is called.",
9012
+ "line": 442,
9013
+ "description": "The `routeDidChange` event only fires once a transition has settled.\nThis includes aborts and error substates. Like the `routeWillChange` event\nit receives a Transition as the sole argument.\n\nA good example is sending some analytics when the route has transitioned:\n\n```app/routes/contact-form.js\nimport Route from '@ember/routing';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Route {\n @service router;\n\n constructor() {\n super(...arguments);\n\n this.router.on('routeDidChange', (transition) => {\n ga.send('pageView', {\n current: transition.to.name,\n from: transition.from.name\n });\n })\n }\n}\n```\n\n`routeDidChange` will be called after any `Route`'s\n[didTransition](/ember/release/classes/Route/events/didTransition?anchor=didTransition)\naction has been fired.\nThe updates of properties\n[currentURL](/ember/release/classes/RouterService/properties/currentURL?anchor=currentURL),\n[currentRouteName](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRouteName)\nand\n[currentRoute](/ember/release/classes/RouterService/properties/currentURL?anchor=currentRoute)\nare completed at the time `routeDidChange` is called.",
9014
9014
  "itemtype": "event",
9015
9015
  "name": "routeDidChange",
9016
9016
  "params": [
@@ -9027,7 +9027,7 @@
9027
9027
  },
9028
9028
  {
9029
9029
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
9030
- "line": 486,
9030
+ "line": 487,
9031
9031
  "description": "Refreshes all currently active routes, doing a full transition.\nIf a route name is provided and refers to a currently active route,\nit will refresh only that route and its descendents.\nReturns a promise that will be resolved once the refresh is complete.\nAll resetController, beforeModel, model, afterModel, redirect, and setupController\nhooks will be called again. You will get new data from the model hook.",
9032
9032
  "itemtype": "method",
9033
9033
  "name": "refresh",
@@ -9052,7 +9052,7 @@
9052
9052
  },
9053
9053
  {
9054
9054
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
9055
- "line": 519,
9055
+ "line": 520,
9056
9056
  "description": "Name of the current route.\n\nThis property represents the logical name of the route,\nwhich is comma separated.\nFor the following router:\n\n```app/router.js\nRouter.map(function() {\n this.route('about');\n this.route('blog', function () {\n this.route('post', { path: ':post_id' });\n });\n});\n```\n\nIt will return:\n\n* `index` when you visit `/`\n* `about` when you visit `/about`\n* `blog.index` when you visit `/blog`\n* `blog.post` when you visit `/blog/some-post-id`",
9057
9057
  "itemtype": "property",
9058
9058
  "name": "currentRouteName",
@@ -9064,7 +9064,7 @@
9064
9064
  },
9065
9065
  {
9066
9066
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
9067
- "line": 548,
9067
+ "line": 549,
9068
9068
  "description": "Current URL for the application.\n\n This property represents the URL path for this route.\n For the following router:\n\n```app/router.js\nRouter.map(function() {\n this.route('about');\n this.route('blog', function () {\n this.route('post', { path: ':post_id' });\n });\n});\n```\n\nIt will return:\n\n* `/` when you visit `/`\n* `/about` when you visit `/about`\n* `/blog` when you visit `/blog`\n* `/blog/some-post-id` when you visit `/blog/some-post-id`",
9069
9069
  "itemtype": "property",
9070
9070
  "name": "currentURL",
@@ -9076,7 +9076,7 @@
9076
9076
  },
9077
9077
  {
9078
9078
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
9079
- "line": 576,
9079
+ "line": 577,
9080
9080
  "description": "The `location` property returns what implementation of the `location` API\nyour application is using, which determines what type of URL is being used.\n\nSee [Location](/ember/release/classes/Location) for more information.\n\nTo force a particular `location` API implementation to be used in your\napplication you can set a location type on your `config/environment`.\nFor example, to set the `history` type:\n\n```config/environment.js\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'router-service',\n environment,\n rootURL: '/',\n locationType: 'history',\n ...\n }\n}\n```\n\nThe following location types are available by default:\n`auto`, `hash`, `history`, `none`.\n\nSee [HashLocation](/ember/release/classes/HashLocation).\nSee [HistoryLocation](/ember/release/classes/HistoryLocation).\nSee [NoneLocation](/ember/release/classes/NoneLocation).\nSee [AutoLocation](/ember/release/classes/AutoLocation).",
9081
9081
  "itemtype": "property",
9082
9082
  "name": "location",
@@ -9091,7 +9091,7 @@
9091
9091
  },
9092
9092
  {
9093
9093
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
9094
- "line": 615,
9094
+ "line": 616,
9095
9095
  "description": "The `rootURL` property represents the URL of the root of\nthe application, '/' by default.\nThis prefix is assumed on all routes defined on this app.\n\nIf you change the `rootURL` in your environment configuration\nlike so:\n\n```config/environment.js\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'router-service',\n environment,\n rootURL: '/my-root',\n …\n }\n]\n```\n\nThis property will return `/my-root`.",
9096
9096
  "itemtype": "property",
9097
9097
  "name": "rootURL",
@@ -9103,7 +9103,7 @@
9103
9103
  },
9104
9104
  {
9105
9105
  "file": "packages/@ember/-internals/routing/lib/services/router.ts",
9106
- "line": 644,
9106
+ "line": 645,
9107
9107
  "description": "The `currentRoute` property contains metadata about the current leaf route.\nIt returns a `RouteInfo` object that has information like the route name,\nparams, query params and more.\n\nSee [RouteInfo](/ember/release/classes/RouteInfo) for more info.\n\nThis property is guaranteed to change whenever a route transition\nhappens (even when that transition only changes parameters\nand doesn't change the active route).\n\nUsage example:\n```app/components/header.js\n import Component from '@glimmer/component';\n import { inject as service } from '@ember/service';\n import { notEmpty } from '@ember/object/computed';\n\n export default class extends Component {\n @service router;\n\n @notEmpty('router.currentRoute.child') isChildRoute;\n });\n```",
9108
9108
  "itemtype": "property",
9109
9109
  "name": "currentRoute",
@@ -16852,7 +16852,7 @@
16852
16852
  {
16853
16853
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
16854
16854
  "line": 63,
16855
- "description": "A computed property macro that returns true if the value of the dependent\nproperty is null, an empty string, empty array, or empty function.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { empty } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n @empty('todos') isDone;\n}\n\nlet todoList = new ToDoList(\n ['Unit Test', 'Documentation', 'Release']\n);\n\ntodoList.isDone; // false\nset(todoList, 'todos', []);\ntodoList.isDone; // true\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { empty } from '@ember/object/computed';\n\nlet ToDoList = EmberObject.extend({\n isDone: empty('todos')\n});\n\nlet todoList = ToDoList.create({\n todos: ['Unit Test', 'Documentation', 'Release']\n});\n\ntodoList.isDone; // false\nset(todoList, 'todos', []);\ntodoList.isDone; // true\n```",
16855
+ "description": "A computed property macro that returns true if the value of the dependent\nproperty is null, an empty string, empty array, or empty function.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { empty } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n @empty('todos') isDone;\n}\n\nlet todoList = new ToDoList(\n ['Unit Test', 'Documentation', 'Release']\n);\n\ntodoList.isDone; // false\nset(todoList, 'todos', []);\ntodoList.isDone; // true\n```",
16856
16856
  "since": "1.6.0",
16857
16857
  "itemtype": "method",
16858
16858
  "name": "empty",
@@ -16875,8 +16875,8 @@
16875
16875
  },
16876
16876
  {
16877
16877
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
16878
- "line": 131,
16879
- "description": "A computed property that returns true if the value of the dependent property\nis NOT null, an empty string, empty array, or empty function.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { notEmpty } from '@ember/object/computed';\n\nclass Hamster {\n constructor(backpack) {\n set(this, 'backpack', backpack);\n }\n\n @notEmpty('backpack') hasStuff\n}\n\nlet hamster = new Hamster(\n ['Food', 'Sleeping Bag', 'Tent']\n);\n\nhamster.hasStuff; // true\nset(hamster, 'backpack', []);\nhamster.hasStuff; // false\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { notEmpty } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n hasStuff: notEmpty('backpack')\n});\n\nlet hamster = Hamster.create({\n backpack: ['Food', 'Sleeping Bag', 'Tent']\n});\n\nhamster.hasStuff; // true\nset(hamster, 'backpack', []);\nhamster.hasStuff; // false\n```",
16878
+ "line": 112,
16879
+ "description": "A computed property that returns true if the value of the dependent property\nis NOT null, an empty string, empty array, or empty function.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { notEmpty } from '@ember/object/computed';\n\nclass Hamster {\n constructor(backpack) {\n set(this, 'backpack', backpack);\n }\n\n @notEmpty('backpack') hasStuff\n}\n\nlet hamster = new Hamster(\n ['Food', 'Sleeping Bag', 'Tent']\n);\n\nhamster.hasStuff; // true\nset(hamster, 'backpack', []);\nhamster.hasStuff; // false\n```",
16880
16880
  "itemtype": "method",
16881
16881
  "name": "notEmpty",
16882
16882
  "static": 1,
@@ -16898,8 +16898,8 @@
16898
16898
  },
16899
16899
  {
16900
16900
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
16901
- "line": 196,
16902
- "description": "A computed property that returns true if the value of the dependent property\nis null or undefined. This avoids errors from JSLint complaining about use of\n==, which can be technically confusing.\n\n```javascript\nimport { set } from '@ember/object';\nimport { none } from '@ember/object/computed';\n\nclass Hamster {\n @none('food') isHungry;\n}\n\nlet hamster = new Hamster();\n\nhamster.isHungry; // true\n\nset(hamster, 'food', 'Banana');\nhamster.isHungry; // false\n\nset(hamster, 'food', null);\nhamster.isHungry; // true\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { none } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n isHungry: none('food')\n});\n\nlet hamster = Hamster.create();\n\nhamster.isHungry; // true\n\nset(hamster, 'food', 'Banana');\nhamster.isHungry; // false\n\nset(hamster, 'food', null);\nhamster.isHungry; // true\n```",
16901
+ "line": 158,
16902
+ "description": "A computed property that returns true if the value of the dependent property\nis null or undefined. This avoids errors from JSLint complaining about use of\n==, which can be technically confusing.\n\n```javascript\nimport { set } from '@ember/object';\nimport { none } from '@ember/object/computed';\n\nclass Hamster {\n @none('food') isHungry;\n}\n\nlet hamster = new Hamster();\n\nhamster.isHungry; // true\n\nset(hamster, 'food', 'Banana');\nhamster.isHungry; // false\n\nset(hamster, 'food', null);\nhamster.isHungry; // true\n```",
16903
16903
  "itemtype": "method",
16904
16904
  "name": "none",
16905
16905
  "static": 1,
@@ -16921,8 +16921,8 @@
16921
16921
  },
16922
16922
  {
16923
16923
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
16924
- "line": 260,
16925
- "description": "A computed property that returns the inverse boolean value of the original\nvalue for the dependent property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { not } from '@ember/object/computed';\n\nclass User {\n loggedIn = false;\n\n @not('loggedIn') isAnonymous;\n}\n\nlet user = new User();\n\nuser.isAnonymous; // true\nset(user, 'loggedIn', true);\nuser.isAnonymous; // false\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { not } from '@ember/object/computed';\n\nlet User = EmberObject.extend({\n loggedIn: false,\n\n isAnonymous: not('loggedIn')\n});\n\nlet user = User.create();\n\nuser.isAnonymous; // true\nset(user, 'loggedIn', true);\nuser.isAnonymous; // false\n```",
16924
+ "line": 201,
16925
+ "description": "A computed property that returns the inverse boolean value of the original\nvalue for the dependent property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { not } from '@ember/object/computed';\n\nclass User {\n loggedIn = false;\n\n @not('loggedIn') isAnonymous;\n}\n\nlet user = new User();\n\nuser.isAnonymous; // true\nset(user, 'loggedIn', true);\nuser.isAnonymous; // false\n```",
16926
16926
  "itemtype": "method",
16927
16927
  "name": "not",
16928
16928
  "static": 1,
@@ -16944,8 +16944,8 @@
16944
16944
  },
16945
16945
  {
16946
16946
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
16947
- "line": 321,
16948
- "description": "A computed property that converts the provided dependent property into a\nboolean value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { bool } from '@ember/object/computed';\n\n\nclass Hamster {\n @bool('numBananas') hasBananas\n}\n\nlet hamster = new Hamster();\n\nhamster.hasBananas; // false\n\nset(hamster, 'numBananas', 0);\nhamster.hasBananas; // false\n\nset(hamster, 'numBananas', 1);\nhamster.hasBananas; // true\n\nset(hamster, 'numBananas', null);\nhamster.hasBananas; // false\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { bool } from '@ember/object/computed';\n\n\nlet Hamster = EmberObject.extend({\n hasBananas: bool('numBananas')\n});\n\nlet hamster = Hamster.create();\n\nhamster.hasBananas; // false\n\nset(hamster, 'numBananas', 0);\nhamster.hasBananas; // false\n\nset(hamster, 'numBananas', 1);\nhamster.hasBananas; // true\n\nset(hamster, 'numBananas', null);\nhamster.hasBananas; // false\n```",
16947
+ "line": 243,
16948
+ "description": "A computed property that converts the provided dependent property into a\nboolean value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { bool } from '@ember/object/computed';\n\n\nclass Hamster {\n @bool('numBananas') hasBananas\n}\n\nlet hamster = new Hamster();\n\nhamster.hasBananas; // false\n\nset(hamster, 'numBananas', 0);\nhamster.hasBananas; // false\n\nset(hamster, 'numBananas', 1);\nhamster.hasBananas; // true\n\nset(hamster, 'numBananas', null);\nhamster.hasBananas; // false\n```",
16949
16949
  "itemtype": "method",
16950
16950
  "name": "bool",
16951
16951
  "static": 1,
@@ -16967,8 +16967,8 @@
16967
16967
  },
16968
16968
  {
16969
16969
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
16970
- "line": 394,
16971
- "description": "A computed property which matches the original value for the dependent\nproperty against a given RegExp, returning `true` if the value matches the\nRegExp and `false` if it does not.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { match } from '@ember/object/computed';\n\nclass User {\n @match('email', /^.+@.+\\..+$/) hasValidEmail;\n}\n\nlet user = new User();\n\nuser.hasValidEmail; // false\n\nset(user, 'email', '');\nuser.hasValidEmail; // false\n\nset(user, 'email', 'ember_hamster@example.com');\nuser.hasValidEmail; // true\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { match } from '@ember/object/computed';\n\nlet User = EmberObject.extend({\n hasValidEmail: match('email', /^.+@.+\\..+$/)\n});\n\nlet user = User.create();\n\nuser.hasValidEmail; // false\n\nset(user, 'email', '');\nuser.hasValidEmail; // false\n\nset(user, 'email', 'ember_hamster@example.com');\nuser.hasValidEmail; // true\n```",
16970
+ "line": 291,
16971
+ "description": "A computed property which matches the original value for the dependent\nproperty against a given RegExp, returning `true` if the value matches the\nRegExp and `false` if it does not.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { match } from '@ember/object/computed';\n\nclass User {\n @match('email', /^.+@.+\\..+$/) hasValidEmail;\n}\n\nlet user = new User();\n\nuser.hasValidEmail; // false\n\nset(user, 'email', '');\nuser.hasValidEmail; // false\n\nset(user, 'email', 'ember_hamster@example.com');\nuser.hasValidEmail; // true\n```",
16972
16972
  "itemtype": "method",
16973
16973
  "name": "match",
16974
16974
  "static": 1,
@@ -16995,8 +16995,8 @@
16995
16995
  },
16996
16996
  {
16997
16997
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
16998
- "line": 462,
16999
- "description": "A computed property that returns true if the provided dependent property is\nequal to the given value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { equal } from '@ember/object/computed';\n\nclass Hamster {\n @equal('percentCarrotsEaten', 100) satisfied;\n}\n\nlet hamster = new Hamster();\n\nhamster.satisfied; // false\n\nset(hamster, 'percentCarrotsEaten', 100);\nhamster.satisfied; // true\n\nset(hamster, 'percentCarrotsEaten', 50);\nhamster.satisfied; // false\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { equal } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n satisfied: equal('percentCarrotsEaten', 100)\n});\n\nlet hamster = Hamster.create();\n\nhamster.satisfied; // false\n\nset(hamster, 'percentCarrotsEaten', 100);\nhamster.satisfied; // true\n\nset(hamster, 'percentCarrotsEaten', 50);\nhamster.satisfied; // false\n```",
16998
+ "line": 338,
16999
+ "description": "A computed property that returns true if the provided dependent property is\nequal to the given value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { equal } from '@ember/object/computed';\n\nclass Hamster {\n @equal('percentCarrotsEaten', 100) satisfied;\n}\n\nlet hamster = new Hamster();\n\nhamster.satisfied; // false\n\nset(hamster, 'percentCarrotsEaten', 100);\nhamster.satisfied; // true\n\nset(hamster, 'percentCarrotsEaten', 50);\nhamster.satisfied; // false\n```",
17000
17000
  "itemtype": "method",
17001
17001
  "name": "equal",
17002
17002
  "static": 1,
@@ -17023,8 +17023,8 @@
17023
17023
  },
17024
17024
  {
17025
17025
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17026
- "line": 528,
17027
- "description": "A computed property that returns true if the provided dependent property is\ngreater than the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { gt } from '@ember/object/computed';\n\nclass Hamster {\n @gt('numBananas', 10) hasTooManyBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 11);\nhamster.hasTooManyBananas; // true\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { gt } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n hasTooManyBananas: gt('numBananas', 10)\n});\n\nlet hamster = Hamster.create();\n\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 11);\nhamster.hasTooManyBananas; // true\n```",
17026
+ "line": 383,
17027
+ "description": "A computed property that returns true if the provided dependent property is\ngreater than the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { gt } from '@ember/object/computed';\n\nclass Hamster {\n @gt('numBananas', 10) hasTooManyBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 11);\nhamster.hasTooManyBananas; // true\n```",
17028
17028
  "itemtype": "method",
17029
17029
  "name": "gt",
17030
17030
  "static": 1,
@@ -17051,8 +17051,8 @@
17051
17051
  },
17052
17052
  {
17053
17053
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17054
- "line": 594,
17055
- "description": "A computed property that returns true if the provided dependent property is\ngreater than or equal to the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { gte } from '@ember/object/computed';\n\nclass Hamster {\n @gte('numBananas', 10) hasTooManyBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 10);\nhamster.hasTooManyBananas; // true\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { gte } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n hasTooManyBananas: gte('numBananas', 10)\n});\n\nlet hamster = Hamster.create();\n\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 10);\nhamster.hasTooManyBananas; // true\n```",
17054
+ "line": 428,
17055
+ "description": "A computed property that returns true if the provided dependent property is\ngreater than or equal to the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { gte } from '@ember/object/computed';\n\nclass Hamster {\n @gte('numBananas', 10) hasTooManyBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.hasTooManyBananas; // false\n\nset(hamster, 'numBananas', 10);\nhamster.hasTooManyBananas; // true\n```",
17056
17056
  "itemtype": "method",
17057
17057
  "name": "gte",
17058
17058
  "static": 1,
@@ -17079,8 +17079,8 @@
17079
17079
  },
17080
17080
  {
17081
17081
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17082
- "line": 660,
17083
- "description": "A computed property that returns true if the provided dependent property is\nless than the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { lt } from '@ember/object/computed';\n\nclass Hamster {\n @lt('numBananas', 3) needsMoreBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.needsMoreBananas; // true\n\nset(hamster, 'numBananas', 3);\nhamster.needsMoreBananas; // false\n\nset(hamster, 'numBananas', 2);\nhamster.needsMoreBananas; // true\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { lt } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n needsMoreBananas: lt('numBananas', 3)\n});\n\nlet hamster = Hamster.create();\n\nhamster.needsMoreBananas; // true\n\nset(hamster, 'numBananas', 3);\nhamster.needsMoreBananas; // false\n\nset(hamster, 'numBananas', 2);\nhamster.needsMoreBananas; // true\n```",
17082
+ "line": 473,
17083
+ "description": "A computed property that returns true if the provided dependent property is\nless than the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { lt } from '@ember/object/computed';\n\nclass Hamster {\n @lt('numBananas', 3) needsMoreBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.needsMoreBananas; // true\n\nset(hamster, 'numBananas', 3);\nhamster.needsMoreBananas; // false\n\nset(hamster, 'numBananas', 2);\nhamster.needsMoreBananas; // true\n```",
17084
17084
  "itemtype": "method",
17085
17085
  "name": "lt",
17086
17086
  "static": 1,
@@ -17107,8 +17107,8 @@
17107
17107
  },
17108
17108
  {
17109
17109
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17110
- "line": 726,
17111
- "description": "A computed property that returns true if the provided dependent property is\nless than or equal to the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { lte } from '@ember/object/computed';\n\nclass Hamster {\n @lte('numBananas', 3) needsMoreBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.needsMoreBananas; // true\n\nset(hamster, 'numBananas', 5);\nhamster.needsMoreBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.needsMoreBananas; // true\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { lte } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n needsMoreBananas: lte('numBananas', 3)\n});\n\nlet hamster = Hamster.create();\n\nhamster.needsMoreBananas; // true\n\nset(hamster, 'numBananas', 5);\nhamster.needsMoreBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.needsMoreBananas; // true\n```",
17110
+ "line": 518,
17111
+ "description": "A computed property that returns true if the provided dependent property is\nless than or equal to the provided value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { lte } from '@ember/object/computed';\n\nclass Hamster {\n @lte('numBananas', 3) needsMoreBananas;\n}\n\nlet hamster = new Hamster();\n\nhamster.needsMoreBananas; // true\n\nset(hamster, 'numBananas', 5);\nhamster.needsMoreBananas; // false\n\nset(hamster, 'numBananas', 3);\nhamster.needsMoreBananas; // true\n```",
17112
17112
  "itemtype": "method",
17113
17113
  "name": "lte",
17114
17114
  "static": 1,
@@ -17135,8 +17135,8 @@
17135
17135
  },
17136
17136
  {
17137
17137
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17138
- "line": 792,
17139
- "description": "A computed property that performs a logical `and` on the original values for\nthe provided dependent properties.\n\nYou may pass in more than two properties and even use property brace\nexpansion. The computed property will return the first falsy value or last\ntruthy value just like JavaScript's `&&` operator.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { and } from '@ember/object/computed';\n\nclass Hamster {\n @and('hasTent', 'hasBackpack') readyForCamp;\n @and('hasWalkingStick', 'hasBackpack') readyForHike;\n}\n\nlet tomster = new Hamster();\n\ntomster.readyForCamp; // false\n\nset(tomster, 'hasTent', true);\ntomster.readyForCamp; // false\n\nset(tomster, 'hasBackpack', true);\ntomster.readyForCamp; // true\n\nset(tomster, 'hasBackpack', 'Yes');\ntomster.readyForCamp; // 'Yes'\n\nset(tomster, 'hasWalkingStick', null);\ntomster.readyForHike; // null\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { and } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n readyForCamp: and('hasTent', 'hasBackpack'),\n readyForHike: and('hasWalkingStick', 'hasBackpack')\n});\n\nlet tomster = Hamster.create();\n\ntomster.readyForCamp; // false\n\nset(tomster, 'hasTent', true);\ntomster.readyForCamp; // false\n\nset(tomster, 'hasBackpack', true);\ntomster.readyForCamp; // true\n\nset(tomster, 'hasBackpack', 'Yes');\ntomster.readyForCamp; // 'Yes'\n\nset(tomster, 'hasWalkingStick', null);\ntomster.readyForHike; // null\n```",
17138
+ "line": 563,
17139
+ "description": "A computed property that performs a logical `and` on the original values for\nthe provided dependent properties.\n\nYou may pass in more than two properties and even use property brace\nexpansion. The computed property will return the first falsy value or last\ntruthy value just like JavaScript's `&&` operator.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { and } from '@ember/object/computed';\n\nclass Hamster {\n @and('hasTent', 'hasBackpack') readyForCamp;\n @and('hasWalkingStick', 'hasBackpack') readyForHike;\n}\n\nlet tomster = new Hamster();\n\ntomster.readyForCamp; // false\n\nset(tomster, 'hasTent', true);\ntomster.readyForCamp; // false\n\nset(tomster, 'hasBackpack', true);\ntomster.readyForCamp; // true\n\nset(tomster, 'hasBackpack', 'Yes');\ntomster.readyForCamp; // 'Yes'\n\nset(tomster, 'hasWalkingStick', null);\ntomster.readyForHike; // null\n```",
17140
17140
  "itemtype": "method",
17141
17141
  "name": "and",
17142
17142
  "static": 1,
@@ -17159,8 +17159,8 @@
17159
17159
  },
17160
17160
  {
17161
17161
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17162
- "line": 866,
17163
- "description": "A computed property which performs a logical `or` on the original values for\nthe provided dependent properties.\n\nYou may pass in more than two properties and even use property brace\nexpansion. The computed property will return the first truthy value or last\nfalsy value just like JavaScript's `||` operator.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { or } from '@ember/object/computed';\n\nclass Hamster {\n @or('hasJacket', 'hasUmbrella') readyForRain;\n @or('hasSunscreen', 'hasUmbrella') readyForBeach;\n}\n\nlet tomster = new Hamster();\n\ntomster.readyForRain; // undefined\n\nset(tomster, 'hasUmbrella', true);\ntomster.readyForRain; // true\n\nset(tomster, 'hasJacket', 'Yes');\ntomster.readyForRain; // 'Yes'\n\nset(tomster, 'hasSunscreen', 'Check');\ntomster.readyForBeach; // 'Check'\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { or } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n readyForRain: or('hasJacket', 'hasUmbrella'),\n readyForBeach: or('hasSunscreen', 'hasUmbrella')\n});\n\nlet tomster = Hamster.create();\n\ntomster.readyForRain; // undefined\n\nset(tomster, 'hasUmbrella', true);\ntomster.readyForRain; // true\n\nset(tomster, 'hasJacket', 'Yes');\ntomster.readyForRain; // 'Yes'\n\nset(tomster, 'hasSunscreen', 'Check');\ntomster.readyForBeach; // 'Check'\n```",
17162
+ "line": 609,
17163
+ "description": "A computed property which performs a logical `or` on the original values for\nthe provided dependent properties.\n\nYou may pass in more than two properties and even use property brace\nexpansion. The computed property will return the first truthy value or last\nfalsy value just like JavaScript's `||` operator.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { or } from '@ember/object/computed';\n\nclass Hamster {\n @or('hasJacket', 'hasUmbrella') readyForRain;\n @or('hasSunscreen', 'hasUmbrella') readyForBeach;\n}\n\nlet tomster = new Hamster();\n\ntomster.readyForRain; // undefined\n\nset(tomster, 'hasUmbrella', true);\ntomster.readyForRain; // true\n\nset(tomster, 'hasJacket', 'Yes');\ntomster.readyForRain; // 'Yes'\n\nset(tomster, 'hasSunscreen', 'Check');\ntomster.readyForBeach; // 'Check'\n```",
17164
17164
  "itemtype": "method",
17165
17165
  "name": "or",
17166
17166
  "static": 1,
@@ -17183,8 +17183,8 @@
17183
17183
  },
17184
17184
  {
17185
17185
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17186
- "line": 934,
17187
- "description": "Creates a new property that is an alias for another property on an object.\nCalls to `get` or `set` this property behave as though they were called on the\noriginal property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { alias } from '@ember/object/computed';\n\nclass Person {\n name = 'Alex Matchneer';\n\n @alias('name') nomen;\n}\n\nlet alex = new Person();\n\nalex.nomen; // 'Alex Matchneer'\nalex.name; // 'Alex Matchneer'\n\nset(alex, 'nomen', '@machty');\nalex.name; // '@machty'\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { alias } from '@ember/object/computed';\n\nlet Person = EmberObject.extend({\n name: 'Alex Matchneer',\n\n nomen: alias('name')\n});\n\nlet alex = Person.create();\n\nalex.nomen; // 'Alex Matchneer'\nalex.name; // 'Alex Matchneer'\n\nset(alex, 'nomen', '@machty');\nalex.name; // '@machty'\n```",
17186
+ "line": 652,
17187
+ "description": "Creates a new property that is an alias for another property on an object.\nCalls to `get` or `set` this property behave as though they were called on the\noriginal property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { alias } from '@ember/object/computed';\n\nclass Person {\n name = 'Alex Matchneer';\n\n @alias('name') nomen;\n}\n\nlet alex = new Person();\n\nalex.nomen; // 'Alex Matchneer'\nalex.name; // 'Alex Matchneer'\n\nset(alex, 'nomen', '@machty');\nalex.name; // '@machty'\n```",
17188
17188
  "itemtype": "method",
17189
17189
  "name": "alias",
17190
17190
  "static": 1,
@@ -17206,8 +17206,8 @@
17206
17206
  },
17207
17207
  {
17208
17208
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17209
- "line": 990,
17210
- "description": "Where the `alias` computed macro aliases `get` and `set`, and allows for\nbidirectional data flow, the `oneWay` computed macro only provides an aliased\n`get`. The `set` will not mutate the upstream property, rather causes the\ncurrent property to become the value set. This causes the downstream property\nto permanently diverge from the upstream property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { oneWay }from '@ember/object/computed';\n\nclass User {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @oneWay('firstName') nickName;\n}\n\nlet teddy = new User('Teddy', 'Zeenny');\n\nteddy.nickName; // 'Teddy'\n\nset(teddy, 'nickName', 'TeddyBear');\nteddy.firstName; // 'Teddy'\nteddy.nickName; // 'TeddyBear'\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { oneWay } from '@ember/object/computed';\n\nlet User = EmberObject.extend({\n firstName: null,\n lastName: null,\n\n nickName: oneWay('firstName')\n});\n\nlet teddy = User.create({\n firstName: 'Teddy',\n lastName: 'Zeenny'\n});\n\nteddy.nickName; // 'Teddy'\n\nset(teddy, 'nickName', 'TeddyBear'); // 'TeddyBear'\nteddy.firstName; // 'Teddy'\nteddy.nickName; // 'TeddyBear'\n```",
17209
+ "line": 687,
17210
+ "description": "Where the `alias` computed macro aliases `get` and `set`, and allows for\nbidirectional data flow, the `oneWay` computed macro only provides an aliased\n`get`. The `set` will not mutate the upstream property, rather causes the\ncurrent property to become the value set. This causes the downstream property\nto permanently diverge from the upstream property.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { oneWay }from '@ember/object/computed';\n\nclass User {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @oneWay('firstName') nickName;\n}\n\nlet teddy = new User('Teddy', 'Zeenny');\n\nteddy.nickName; // 'Teddy'\n\nset(teddy, 'nickName', 'TeddyBear');\nteddy.firstName; // 'Teddy'\nteddy.nickName; // 'TeddyBear'\n```",
17211
17211
  "itemtype": "method",
17212
17212
  "name": "oneWay",
17213
17213
  "static": 1,
@@ -17229,7 +17229,7 @@
17229
17229
  },
17230
17230
  {
17231
17231
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17232
- "line": 1063,
17232
+ "line": 735,
17233
17233
  "description": "This is a more semantically meaningful alias of the `oneWay` computed macro,\nwhose name is somewhat ambiguous as to which direction the data flows.",
17234
17234
  "itemtype": "method",
17235
17235
  "name": "reads",
@@ -17252,8 +17252,8 @@
17252
17252
  },
17253
17253
  {
17254
17254
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17255
- "line": 1076,
17256
- "description": "Where `oneWay` computed macro provides oneWay bindings, the `readOnly`\ncomputed macro provides a readOnly one way binding. Very often when using\nthe `oneWay` macro one does not also want changes to propagate back up, as\nthey will replace the value.\n\nThis prevents the reverse flow, and also throws an exception when it occurs.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { readOnly } from '@ember/object/computed';\n\nclass User {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @readOnly('firstName') nickName;\n});\n\nlet teddy = new User('Teddy', 'Zeenny');\n\nteddy.nickName; // 'Teddy'\n\nset(teddy, 'nickName', 'TeddyBear'); // throws Exception\n// throw new EmberError('Cannot Set: nickName on: <User:ember27288>' );`\n\nteddy.firstName; // 'Teddy'\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { readOnly } from '@ember/object/computed';\n\nlet User = EmberObject.extend({\n firstName: null,\n lastName: null,\n\n nickName: readOnly('firstName')\n});\n\nlet teddy = User.create({\n firstName: 'Teddy',\n lastName: 'Zeenny'\n});\n\nteddy.nickName; // 'Teddy'\n\nset(teddy, 'nickName', 'TeddyBear'); // throws Exception\n// throw new EmberError('Cannot Set: nickName on: <User:ember27288>' );`\n\nteddy.firstName; // 'Teddy'\n```",
17255
+ "line": 748,
17256
+ "description": "Where `oneWay` computed macro provides oneWay bindings, the `readOnly`\ncomputed macro provides a readOnly one way binding. Very often when using\nthe `oneWay` macro one does not also want changes to propagate back up, as\nthey will replace the value.\n\nThis prevents the reverse flow, and also throws an exception when it occurs.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { readOnly } from '@ember/object/computed';\n\nclass User {\n constructor(firstName, lastName) {\n set(this, 'firstName', firstName);\n set(this, 'lastName', lastName);\n }\n\n @readOnly('firstName') nickName;\n});\n\nlet teddy = new User('Teddy', 'Zeenny');\n\nteddy.nickName; // 'Teddy'\n\nset(teddy, 'nickName', 'TeddyBear'); // throws Exception\n// throw new EmberError('Cannot Set: nickName on: <User:ember27288>' );`\n\nteddy.firstName; // 'Teddy'\n```",
17257
17257
  "itemtype": "method",
17258
17258
  "name": "readOnly",
17259
17259
  "static": 1,
@@ -17276,8 +17276,8 @@
17276
17276
  },
17277
17277
  {
17278
17278
  "file": "packages/@ember/object/lib/computed/computed_macros.js",
17279
- "line": 1153,
17280
- "description": "Creates a new property that is an alias for another property on an object.\nCalls to `get` or `set` this property behave as though they were called on the\noriginal property, but also print a deprecation warning.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { deprecatingAlias } from '@ember/object/computed';\n\nclass Hamster {\n @deprecatingAlias('cavendishCount', {\n id: 'hamster.deprecate-banana',\n until: '3.0.0'\n })\n bananaCount;\n}\n\nlet hamster = new Hamster();\n\nset(hamster, 'bananaCount', 5); // Prints a deprecation warning.\nhamster.cavendishCount; // 5\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { deprecatingAlias } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n bananaCount: deprecatingAlias('cavendishCount', {\n id: 'hamster.deprecate-banana',\n until: '3.0.0'\n })\n});\n\nlet hamster = Hamster.create();\n\nset(hamster, 'bananaCount', 5); // Prints a deprecation warning.\nhamster.cavendishCount; // 5\n```",
17279
+ "line": 799,
17280
+ "description": "Creates a new property that is an alias for another property on an object.\nCalls to `get` or `set` this property behave as though they were called on the\noriginal property, but also print a deprecation warning.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { deprecatingAlias } from '@ember/object/computed';\n\nclass Hamster {\n @deprecatingAlias('cavendishCount', {\n id: 'hamster.deprecate-banana',\n until: '3.0.0'\n })\n bananaCount;\n}\n\nlet hamster = new Hamster();\n\nset(hamster, 'bananaCount', 5); // Prints a deprecation warning.\nhamster.cavendishCount; // 5\n```",
17281
17281
  "itemtype": "method",
17282
17282
  "name": "deprecatingAlias",
17283
17283
  "static": 1,
@@ -17306,7 +17306,7 @@
17306
17306
  {
17307
17307
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17308
17308
  "line": 56,
17309
- "description": "A computed property that returns the sum of the values in the dependent array.\n\nExample:\n\n```javascript\nimport { sum } from '@ember/object/computed';\n\nclass Invoice {\n lineItems = [1.00, 2.50, 9.99];\n\n @sum('lineItems') total;\n}\n\nlet invoice = new Invoice();\n\ninvoice.total; // 13.49\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { sum } from '@ember/object/computed';\n\nlet Invoice = EmberObject.extend({\n lineItems: [1.00, 2.50, 9.99],\n\n total: sum('lineItems')\n})\n\nlet invoice = Invoice.create();\n\ninvoice.total; // 13.49\n```",
17309
+ "description": "A computed property that returns the sum of the values in the dependent array.\n\nExample:\n\n```javascript\nimport { sum } from '@ember/object/computed';\n\nclass Invoice {\n lineItems = [1.00, 2.50, 9.99];\n\n @sum('lineItems') total;\n}\n\nlet invoice = new Invoice();\n\ninvoice.total; // 13.49\n```",
17310
17310
  "itemtype": "method",
17311
17311
  "name": "sum",
17312
17312
  "static": 1,
@@ -17329,8 +17329,8 @@
17329
17329
  },
17330
17330
  {
17331
17331
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17332
- "line": 110,
17333
- "description": "A computed property that calculates the maximum value in the dependent array.\nThis will return `-Infinity` when the dependent array is empty.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy, max } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n @max('childAges') maxChildAge;\n}\n\nlet lordByron = new Person();\n\nlordByron.maxChildAge; // -Infinity\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.maxChildAge; // 7\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.maxChildAge; // 8\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { mapBy, max } from '@ember/object/computed';\n\nlet Person = EmberObject.extend({\n childAges: mapBy('children', 'age'),\n maxChildAge: max('childAges')\n});\n\nlet lordByron = Person.create({ children: [] });\n\nlordByron.maxChildAge; // -Infinity\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.maxChildAge; // 7\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.maxChildAge; // 8\n```\n\nIf the types of the arguments are not numbers, they will be converted to\nnumbers and the type of the return value will always be `Number`. For example,\nthe max of a list of Date objects will be the highest timestamp as a `Number`.\nThis behavior is consistent with `Math.max`.",
17332
+ "line": 93,
17333
+ "description": "A computed property that calculates the maximum value in the dependent array.\nThis will return `-Infinity` when the dependent array is empty.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy, max } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n @max('childAges') maxChildAge;\n}\n\nlet lordByron = new Person();\n\nlordByron.maxChildAge; // -Infinity\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.maxChildAge; // 7\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.maxChildAge; // 8\n```\n\nIf the types of the arguments are not numbers, they will be converted to\nnumbers and the type of the return value will always be `Number`. For example,\nthe max of a list of Date objects will be the highest timestamp as a `Number`.\nThis behavior is consistent with `Math.max`.",
17334
17334
  "itemtype": "method",
17335
17335
  "name": "max",
17336
17336
  "static": 1,
@@ -17352,8 +17352,8 @@
17352
17352
  },
17353
17353
  {
17354
17354
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17355
- "line": 210,
17356
- "description": "A computed property that calculates the minimum value in the dependent array.\nThis will return `Infinity` when the dependent array is empty.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy, min } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n @min('childAges') minChildAge;\n}\n\nlet lordByron = Person.create({ children: [] });\n\nlordByron.minChildAge; // Infinity\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.minChildAge; // 7\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.minChildAge; // 5\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { mapBy, min } from '@ember/object/computed';\n\nlet Person = EmberObject.extend({\n childAges: mapBy('children', 'age'),\n minChildAge: min('childAges')\n});\n\nlet lordByron = Person.create({ children: [] });\n\nlordByron.minChildAge; // Infinity\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.minChildAge; // 7\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.minChildAge; // 5\n```\n\nIf the types of the arguments are not numbers, they will be converted to\nnumbers and the type of the return value will always be `Number`. For example,\nthe min of a list of Date objects will be the lowest timestamp as a `Number`.\nThis behavior is consistent with `Math.min`.",
17355
+ "line": 157,
17356
+ "description": "A computed property that calculates the minimum value in the dependent array.\nThis will return `Infinity` when the dependent array is empty.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy, min } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n @min('childAges') minChildAge;\n}\n\nlet lordByron = Person.create({ children: [] });\n\nlordByron.minChildAge; // Infinity\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.minChildAge; // 7\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.minChildAge; // 5\n```\n\nIf the types of the arguments are not numbers, they will be converted to\nnumbers and the type of the return value will always be `Number`. For example,\nthe min of a list of Date objects will be the lowest timestamp as a `Number`.\nThis behavior is consistent with `Math.min`.",
17357
17357
  "itemtype": "method",
17358
17358
  "name": "min",
17359
17359
  "static": 1,
@@ -17375,8 +17375,8 @@
17375
17375
  },
17376
17376
  {
17377
17377
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17378
- "line": 309,
17379
- "description": "Returns an array mapped via the callback\n\nThe callback method you provide should have the following signature:\n- `item` is the current item in the iteration.\n- `index` is the integer index of the current item in the iteration.\n\n```javascript\nfunction mapCallback(item, index);\n```\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { map } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @map('chores', function(chore, index) {\n return `${chore.toUpperCase()}!`;\n })\n excitingChores;\n});\n\nlet hamster = new Hamster(['clean', 'write more unit tests']);\n\nhamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { map } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n excitingChores: map('chores', function(chore, index) {\n return `${chore.toUpperCase()}!`;\n })\n});\n\nlet hamster = Hamster.create({\n chores: ['clean', 'write more unit tests']\n});\n\nhamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n```\n\nYou can optionally pass an array of additional dependent keys as the second\nparameter to the macro, if your map function relies on any external values:\n\n```javascript\nimport { set } from '@ember/object';\nimport { map } from '@ember/object/computed';\n\nclass Hamster {\n shouldUpperCase = false;\n\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @map('chores', ['shouldUpperCase'], function(chore, index) {\n if (this.shouldUpperCase) {\n return `${chore.toUpperCase()}!`;\n } else {\n return `${chore}!`;\n }\n })\n excitingChores;\n}\n\nlet hamster = new Hamster(['clean', 'write more unit tests']);\n\nhamster.excitingChores; // ['clean!', 'write more unit tests!']\n\nset(hamster, 'shouldUpperCase', true);\nhamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n```",
17378
+ "line": 220,
17379
+ "description": "Returns an array mapped via the callback\n\nThe callback method you provide should have the following signature:\n- `item` is the current item in the iteration.\n- `index` is the integer index of the current item in the iteration.\n\n```javascript\nfunction mapCallback(item, index);\n```\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { map } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @map('chores', function(chore, index) {\n return `${chore.toUpperCase()}!`;\n })\n excitingChores;\n});\n\nlet hamster = new Hamster(['clean', 'write more unit tests']);\n\nhamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n```\n\nYou can optionally pass an array of additional dependent keys as the second\nparameter to the macro, if your map function relies on any external values:\n\n```javascript\nimport { set } from '@ember/object';\nimport { map } from '@ember/object/computed';\n\nclass Hamster {\n shouldUpperCase = false;\n\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @map('chores', ['shouldUpperCase'], function(chore, index) {\n if (this.shouldUpperCase) {\n return `${chore.toUpperCase()}!`;\n } else {\n return `${chore}!`;\n }\n })\n excitingChores;\n}\n\nlet hamster = new Hamster(['clean', 'write more unit tests']);\n\nhamster.excitingChores; // ['clean!', 'write more unit tests!']\n\nset(hamster, 'shouldUpperCase', true);\nhamster.excitingChores; // ['CLEAN!', 'WRITE MORE UNIT TESTS!']\n```",
17380
17380
  "itemtype": "method",
17381
17381
  "name": "map",
17382
17382
  "static": 1,
@@ -17409,8 +17409,8 @@
17409
17409
  },
17410
17410
  {
17411
17411
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17412
- "line": 429,
17413
- "description": "Returns an array mapped to the specified key.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n}\n\nlet lordByron = new Person();\n\nlordByron.childAges; // []\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.childAges; // [7]\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.childAges; // [7, 5, 8]\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { mapBy } from '@ember/object/computed';\n\nlet Person = EmberObject.extend({\n childAges: mapBy('children', 'age')\n});\n\nlet lordByron = Person.create({ children: [] });\n\nlordByron.childAges; // []\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.childAges; // [7]\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.childAges; // [7, 5, 8]\n```",
17412
+ "line": 321,
17413
+ "description": "Returns an array mapped to the specified key.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { mapBy } from '@ember/object/computed';\n\nclass Person {\n children = [];\n\n @mapBy('children', 'age') childAges;\n}\n\nlet lordByron = new Person();\n\nlordByron.childAges; // []\n\nset(lordByron, 'children', [\n {\n name: 'Augusta Ada Byron',\n age: 7\n }\n]);\nlordByron.childAges; // [7]\n\nset(lordByron, 'children', [\n ...lordByron.children,\n {\n name: 'Allegra Byron',\n age: 5\n }, {\n name: 'Elizabeth Medora Leigh',\n age: 8\n }\n]);\nlordByron.childAges; // [7, 5, 8]\n```",
17414
17414
  "itemtype": "method",
17415
17415
  "name": "mapBy",
17416
17416
  "static": 1,
@@ -17437,8 +17437,8 @@
17437
17437
  },
17438
17438
  {
17439
17439
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17440
- "line": 531,
17441
- "description": "Filters the array by the callback.\n\nThe callback method you provide should have the following signature:\n- `item` is the current item in the iteration.\n- `index` is the integer index of the current item in the iteration.\n- `array` is the dependant array itself.\n\n```javascript\nfunction filterCallback(item, index, array);\n```\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filter('chores', function(chore, index, array) {\n return !chore.done;\n })\n remainingChores;\n}\n\nlet hamster = Hamster.create([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\n\nhamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { filter } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n remainingChores: filter('chores', function(chore, index, array) {\n return !chore.done;\n })\n});\n\nlet hamster = Hamster.create({\n chores: [\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n ]\n});\n\nhamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n```\n\nYou can also use `@each.property` in your dependent key, the callback will\nstill use the underlying array:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filter('chores.@each.done', function(chore, index, array) {\n return !chore.done;\n })\n remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\nhamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n\nset(hamster.chores[2], 'done', true);\nhamster.remainingChores; // []\n```\n\nFinally, you can optionally pass an array of additional dependent keys as the\nsecond parameter to the macro, if your filter function relies on any external\nvalues:\n\n```javascript\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n doneKey = 'finished';\n\n @filter('chores', ['doneKey'], function(chore, index, array) {\n return !chore[this.doneKey];\n })\n remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', finished: true },\n { name: 'clean', finished: true },\n { name: 'write more unit tests', finished: false }\n]);\n\nhamster.remainingChores; // [{name: 'write more unit tests', finished: false}]\n```",
17440
+ "line": 388,
17441
+ "description": "Filters the array by the callback.\n\nThe callback method you provide should have the following signature:\n- `item` is the current item in the iteration.\n- `index` is the integer index of the current item in the iteration.\n- `array` is the dependant array itself.\n\n```javascript\nfunction filterCallback(item, index, array);\n```\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filter('chores', function(chore, index, array) {\n return !chore.done;\n })\n remainingChores;\n}\n\nlet hamster = Hamster.create([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\n\nhamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n```\n\nYou can also use `@each.property` in your dependent key, the callback will\nstill use the underlying array:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filter('chores.@each.done', function(chore, index, array) {\n return !chore.done;\n })\n remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\nhamster.remainingChores; // [{name: 'write more unit tests', done: false}]\n\nset(hamster.chores[2], 'done', true);\nhamster.remainingChores; // []\n```\n\nFinally, you can optionally pass an array of additional dependent keys as the\nsecond parameter to the macro, if your filter function relies on any external\nvalues:\n\n```javascript\nimport { filter } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n doneKey = 'finished';\n\n @filter('chores', ['doneKey'], function(chore, index, array) {\n return !chore[this.doneKey];\n })\n remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', finished: true },\n { name: 'clean', finished: true },\n { name: 'write more unit tests', finished: false }\n]);\n\nhamster.remainingChores; // [{name: 'write more unit tests', finished: false}]\n```",
17442
17442
  "itemtype": "method",
17443
17443
  "name": "filter",
17444
17444
  "static": 1,
@@ -17471,8 +17471,8 @@
17471
17471
  },
17472
17472
  {
17473
17473
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17474
- "line": 685,
17475
- "description": "Filters the array by the property and value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filterBy } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filterBy('chores', 'done', false) remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\n\nhamster.remainingChores; // [{ name: 'write more unit tests', done: false }]\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { filterBy } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n remainingChores: filterBy('chores', 'done', false)\n});\n\nlet hamster = Hamster.create({\n chores: [\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n ]\n});\n\nhamster.remainingChores; // [{ name: 'write more unit tests', done: false }]\n```",
17474
+ "line": 519,
17475
+ "description": "Filters the array by the property and value.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { filterBy } from '@ember/object/computed';\n\nclass Hamster {\n constructor(chores) {\n set(this, 'chores', chores);\n }\n\n @filterBy('chores', 'done', false) remainingChores;\n}\n\nlet hamster = new Hamster([\n { name: 'cook', done: true },\n { name: 'clean', done: true },\n { name: 'write more unit tests', done: false }\n]);\n\nhamster.remainingChores; // [{ name: 'write more unit tests', done: false }]\n```",
17476
17476
  "itemtype": "method",
17477
17477
  "name": "filterBy",
17478
17478
  "static": 1,
@@ -17504,8 +17504,8 @@
17504
17504
  },
17505
17505
  {
17506
17506
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17507
- "line": 762,
17508
- "description": "A computed property which returns a new array with all the unique elements\nfrom one or more dependent arrays.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { uniq } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits) {\n set(this, 'fruits', fruits);\n }\n\n @uniq('fruits') uniqueFruits;\n}\n\nlet hamster = new Hamster([\n 'banana',\n 'grape',\n 'kale',\n 'banana'\n]);\n\nhamster.uniqueFruits; // ['banana', 'grape', 'kale']\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { uniq } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n uniqueFruits: uniq('fruits')\n});\n\nlet hamster = Hamster.create({\n fruits: [\n 'banana',\n 'grape',\n 'kale',\n 'banana'\n ]\n});\n\nhamster.uniqueFruits; // ['banana', 'grape', 'kale']\n```",
17507
+ "line": 575,
17508
+ "description": "A computed property which returns a new array with all the unique elements\nfrom one or more dependent arrays.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { uniq } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits) {\n set(this, 'fruits', fruits);\n }\n\n @uniq('fruits') uniqueFruits;\n}\n\nlet hamster = new Hamster([\n 'banana',\n 'grape',\n 'kale',\n 'banana'\n]);\n\nhamster.uniqueFruits; // ['banana', 'grape', 'kale']\n```",
17509
17509
  "itemtype": "method",
17510
17510
  "name": "uniq",
17511
17511
  "static": 1,
@@ -17528,8 +17528,8 @@
17528
17528
  },
17529
17529
  {
17530
17530
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17531
- "line": 850,
17532
- "description": "A computed property which returns a new array with all the unique elements\nfrom an array, with uniqueness determined by specific key.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { uniqBy } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits) {\n set(this, 'fruits', fruits);\n }\n\n @uniqBy('fruits', 'id') uniqueFruits;\n}\n\nlet hamster = new Hamster([\n { id: 1, 'banana' },\n { id: 2, 'grape' },\n { id: 3, 'peach' },\n { id: 1, 'banana' }\n]);\n\nhamster.uniqueFruits; // [ { id: 1, 'banana' }, { id: 2, 'grape' }, { id: 3, 'peach' }]\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { uniqBy } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n uniqueFruits: uniqBy('fruits', 'id')\n});\n\nlet hamster = Hamster.create({\n fruits: [\n { id: 1, 'banana' },\n { id: 2, 'grape' },\n { id: 3, 'peach' },\n { id: 1, 'banana' }\n ]\n});\n\nhamster.uniqueFruits; // [ { id: 1, 'banana' }, { id: 2, 'grape' }, { id: 3, 'peach' }]\n```",
17531
+ "line": 641,
17532
+ "description": "A computed property which returns a new array with all the unique elements\nfrom an array, with uniqueness determined by specific key.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { uniqBy } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits) {\n set(this, 'fruits', fruits);\n }\n\n @uniqBy('fruits', 'id') uniqueFruits;\n}\n\nlet hamster = new Hamster([\n { id: 1, 'banana' },\n { id: 2, 'grape' },\n { id: 3, 'peach' },\n { id: 1, 'banana' }\n]);\n\nhamster.uniqueFruits; // [ { id: 1, 'banana' }, { id: 2, 'grape' }, { id: 3, 'peach' }]\n```",
17533
17533
  "itemtype": "method",
17534
17534
  "name": "uniqBy",
17535
17535
  "static": 1,
@@ -17556,8 +17556,8 @@
17556
17556
  },
17557
17557
  {
17558
17558
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17559
- "line": 926,
17560
- "description": "A computed property which returns a new array with all the unique elements\nfrom one or more dependent arrays.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { union } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits, vegetables) {\n set(this, 'fruits', fruits);\n set(this, 'vegetables', vegetables);\n }\n\n @union('fruits', 'vegetables') uniqueFruits;\n});\n\nlet hamster = new, Hamster(\n [\n 'banana',\n 'grape',\n 'kale',\n 'banana',\n 'tomato'\n ],\n [\n 'tomato',\n 'carrot',\n 'lettuce'\n ]\n);\n\nhamster.uniqueFruits; // ['banana', 'grape', 'kale', 'tomato', 'carrot', 'lettuce']\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { union } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n uniqueFruits: union('fruits', 'vegetables')\n});\n\nlet hamster = Hamster.create({\n fruits: [\n 'banana',\n 'grape',\n 'kale',\n 'banana',\n 'tomato'\n ],\n vegetables: [\n 'tomato',\n 'carrot',\n 'lettuce'\n ]\n});\n\nhamster.uniqueFruits; // ['banana', 'grape', 'kale', 'tomato', 'carrot', 'lettuce']\n```",
17559
+ "line": 695,
17560
+ "description": "A computed property which returns a new array with all the unique elements\nfrom one or more dependent arrays.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { union } from '@ember/object/computed';\n\nclass Hamster {\n constructor(fruits, vegetables) {\n set(this, 'fruits', fruits);\n set(this, 'vegetables', vegetables);\n }\n\n @union('fruits', 'vegetables') uniqueFruits;\n});\n\nlet hamster = new, Hamster(\n [\n 'banana',\n 'grape',\n 'kale',\n 'banana',\n 'tomato'\n ],\n [\n 'tomato',\n 'carrot',\n 'lettuce'\n ]\n);\n\nhamster.uniqueFruits; // ['banana', 'grape', 'kale', 'tomato', 'carrot', 'lettuce']\n```",
17561
17561
  "itemtype": "method",
17562
17562
  "name": "union",
17563
17563
  "static": 1,
@@ -17580,8 +17580,8 @@
17580
17580
  },
17581
17581
  {
17582
17582
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17583
- "line": 1001,
17584
- "description": "A computed property which returns a new array with all the elements\ntwo or more dependent arrays have in common.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { intersect } from '@ember/object/computed';\n\nclass FriendGroups {\n constructor(adaFriends, charlesFriends) {\n set(this, 'adaFriends', adaFriends);\n set(this, 'charlesFriends', charlesFriends);\n }\n\n @intersect('adaFriends', 'charlesFriends') friendsInCommon;\n}\n\nlet groups = new FriendGroups(\n ['Charles Babbage', 'John Hobhouse', 'William King', 'Mary Somerville'],\n ['William King', 'Mary Somerville', 'Ada Lovelace', 'George Peacock']\n);\n\ngroups.friendsInCommon; // ['William King', 'Mary Somerville']\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { intersect } from '@ember/object/computed';\n\nlet FriendGroups = EmberObject.extend({\n friendsInCommon: intersect('adaFriends', 'charlesFriends')\n});\n\nlet groups = FriendGroups.create({\n adaFriends: ['Charles Babbage', 'John Hobhouse', 'William King', 'Mary Somerville'],\n charlesFriends: ['William King', 'Mary Somerville', 'Ada Lovelace', 'George Peacock']\n});\n\ngroups.friendsInCommon; // ['William King', 'Mary Somerville']\n```",
17583
+ "line": 742,
17584
+ "description": "A computed property which returns a new array with all the elements\ntwo or more dependent arrays have in common.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { intersect } from '@ember/object/computed';\n\nclass FriendGroups {\n constructor(adaFriends, charlesFriends) {\n set(this, 'adaFriends', adaFriends);\n set(this, 'charlesFriends', charlesFriends);\n }\n\n @intersect('adaFriends', 'charlesFriends') friendsInCommon;\n}\n\nlet groups = new FriendGroups(\n ['Charles Babbage', 'John Hobhouse', 'William King', 'Mary Somerville'],\n ['William King', 'Mary Somerville', 'Ada Lovelace', 'George Peacock']\n);\n\ngroups.friendsInCommon; // ['William King', 'Mary Somerville']\n```",
17585
17585
  "itemtype": "method",
17586
17586
  "name": "intersect",
17587
17587
  "static": 1,
@@ -17604,8 +17604,8 @@
17604
17604
  },
17605
17605
  {
17606
17606
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17607
- "line": 1093,
17608
- "description": "A computed property which returns a new array with all the properties from the\nfirst dependent array that are not in the second dependent array.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { setDiff } from '@ember/object/computed';\n\nclass Hamster {\n constructor(likes, fruits) {\n set(this, 'likes', likes);\n set(this, 'fruits', fruits);\n }\n\n @setDiff('likes', 'fruits') wants;\n}\n\nlet hamster = new Hamster(\n [\n 'banana',\n 'grape',\n 'kale'\n ],\n [\n 'grape',\n 'kale',\n ]\n);\n\nhamster.wants; // ['banana']\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { setDiff } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n wants: setDiff('likes', 'fruits')\n});\n\nlet hamster = Hamster.create({\n likes: [\n 'banana',\n 'grape',\n 'kale'\n ],\n fruits: [\n 'grape',\n 'kale',\n ]\n});\n\nhamster.wants; // ['banana']\n```",
17607
+ "line": 816,
17608
+ "description": "A computed property which returns a new array with all the properties from the\nfirst dependent array that are not in the second dependent array.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { setDiff } from '@ember/object/computed';\n\nclass Hamster {\n constructor(likes, fruits) {\n set(this, 'likes', likes);\n set(this, 'fruits', fruits);\n }\n\n @setDiff('likes', 'fruits') wants;\n}\n\nlet hamster = new Hamster(\n [\n 'banana',\n 'grape',\n 'kale'\n ],\n [\n 'grape',\n 'kale',\n ]\n);\n\nhamster.wants; // ['banana']\n```",
17609
17609
  "itemtype": "method",
17610
17610
  "name": "setDiff",
17611
17611
  "static": 1,
@@ -17632,8 +17632,8 @@
17632
17632
  },
17633
17633
  {
17634
17634
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17635
- "line": 1188,
17636
- "description": "A computed property that returns the array of values for the provided\ndependent properties.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { collect } from '@ember/object/computed';\n\nclass Hamster {\n @collect('hat', 'shirt') clothes;\n}\n\nlet hamster = new Hamster();\n\nhamster.clothes; // [null, null]\n\nset(hamster, 'hat', 'Camp Hat');\nset(hamster, 'shirt', 'Camp Shirt');\nhamster.clothes; // ['Camp Hat', 'Camp Shirt']\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject, { set } from '@ember/object';\nimport { collect } from '@ember/object/computed';\n\nlet Hamster = EmberObject.extend({\n clothes: collect('hat', 'shirt')\n});\n\nlet hamster = Hamster.create();\n\nhamster.clothes; // [null, null]\n\nset(hamster, 'hat', 'Camp Hat');\nset(hamster, 'shirt', 'Camp Shirt');\nhamster.clothes; // ['Camp Hat', 'Camp Shirt']\n```",
17635
+ "line": 886,
17636
+ "description": "A computed property that returns the array of values for the provided\ndependent properties.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { collect } from '@ember/object/computed';\n\nclass Hamster {\n @collect('hat', 'shirt') clothes;\n}\n\nlet hamster = new Hamster();\n\nhamster.clothes; // [null, null]\n\nset(hamster, 'hat', 'Camp Hat');\nset(hamster, 'shirt', 'Camp Shirt');\nhamster.clothes; // ['Camp Hat', 'Camp Shirt']\n```",
17637
17637
  "itemtype": "method",
17638
17638
  "name": "collect",
17639
17639
  "static": 1,
@@ -17656,8 +17656,8 @@
17656
17656
  },
17657
17657
  {
17658
17658
  "file": "packages/@ember/object/lib/computed/reduce_computed_macros.js",
17659
- "line": 1258,
17660
- "description": "A computed property which returns a new array with all the properties from the\nfirst dependent array sorted based on a property or sort function. The sort\nmacro can be used in two different ways:\n\n1. By providing a sort callback function\n2. By providing an array of keys to sort the array\n\nIn the first form, the callback method you provide should have the following\nsignature:\n\n```javascript\nfunction sortCallback(itemA, itemB);\n```\n\n- `itemA` the first item to compare.\n- `itemB` the second item to compare.\n\nThis function should return negative number (e.g. `-1`) when `itemA` should\ncome before `itemB`. It should return positive number (e.g. `1`) when `itemA`\nshould come after `itemB`. If the `itemA` and `itemB` are equal this function\nshould return `0`.\n\nTherefore, if this function is comparing some numeric values, simple `itemA -\nitemB` or `itemA.get( 'foo' ) - itemB.get( 'foo' )` can be used instead of\nseries of `if`.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using a custom sort function\n @sort('todos', function(a, b){\n if (a.priority > b.priority) {\n return 1;\n } else if (a.priority < b.priority) {\n return -1;\n }\n\n return 0;\n })\n priorityTodos;\n}\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n```\n\nClassic Class Example:\n\n```javascript\nimport EmberObject from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nlet ToDoList = EmberObject.extend({\n // using a custom sort function\n priorityTodos: sort('todos', function(a, b){\n if (a.priority > b.priority) {\n return 1;\n } else if (a.priority < b.priority) {\n return -1;\n }\n\n return 0;\n })\n});\n\nlet todoList = ToDoList.create({\n todos: [\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n ]\n});\n\ntodoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n```\n\nYou can also optionally pass an array of additional dependent keys as the\nsecond parameter, if your sort function is dependent on additional values that\ncould changes:\n\n```js\nimport EmberObject, { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n sortKey = 'priority';\n\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using a custom sort function\n @sort('todos', ['sortKey'], function(a, b){\n if (a[this.sortKey] > b[this.sortKey]) {\n return 1;\n } else if (a[this.sortKey] < b[this.sortKey]) {\n return -1;\n }\n\n return 0;\n })\n sortedTodos;\n});\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n```\n\nIn the second form, you should provide the key of the array of sort values as\nthe second parameter:\n\n```javascript\nimport { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using standard ascending sort\n todosSorting = ['name'];\n @sort('todos', 'todosSorting') sortedTodos;\n\n // using descending sort\n todosSortingDesc = ['name:desc'];\n @sort('todos', 'todosSortingDesc') sortedTodosDesc;\n}\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.sortedTodos; // [{ name:'Documentation', priority:3 }, { name:'Release', priority:1 }, { name:'Unit Test', priority:2 }]\ntodoList.sortedTodosDesc; // [{ name:'Unit Test', priority:2 }, { name:'Release', priority:1 }, { name:'Documentation', priority:3 }]\n```",
17659
+ "line": 937,
17660
+ "description": "A computed property which returns a new array with all the properties from the\nfirst dependent array sorted based on a property or sort function. The sort\nmacro can be used in two different ways:\n\n1. By providing a sort callback function\n2. By providing an array of keys to sort the array\n\nIn the first form, the callback method you provide should have the following\nsignature:\n\n```javascript\nfunction sortCallback(itemA, itemB);\n```\n\n- `itemA` the first item to compare.\n- `itemB` the second item to compare.\n\nThis function should return negative number (e.g. `-1`) when `itemA` should\ncome before `itemB`. It should return positive number (e.g. `1`) when `itemA`\nshould come after `itemB`. If the `itemA` and `itemB` are equal this function\nshould return `0`.\n\nTherefore, if this function is comparing some numeric values, simple `itemA -\nitemB` or `itemA.get( 'foo' ) - itemB.get( 'foo' )` can be used instead of\nseries of `if`.\n\nExample:\n\n```javascript\nimport { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using a custom sort function\n @sort('todos', function(a, b){\n if (a.priority > b.priority) {\n return 1;\n } else if (a.priority < b.priority) {\n return -1;\n }\n\n return 0;\n })\n priorityTodos;\n}\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n```\n\nYou can also optionally pass an array of additional dependent keys as the\nsecond parameter, if your sort function is dependent on additional values that\ncould changes:\n\n```js\nimport EmberObject, { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n sortKey = 'priority';\n\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using a custom sort function\n @sort('todos', ['sortKey'], function(a, b){\n if (a[this.sortKey] > b[this.sortKey]) {\n return 1;\n } else if (a[this.sortKey] < b[this.sortKey]) {\n return -1;\n }\n\n return 0;\n })\n sortedTodos;\n});\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.priorityTodos; // [{ name:'Release', priority:1 }, { name:'Unit Test', priority:2 }, { name:'Documentation', priority:3 }]\n```\n\nIn the second form, you should provide the key of the array of sort values as\nthe second parameter:\n\n```javascript\nimport { set } from '@ember/object';\nimport { sort } from '@ember/object/computed';\n\nclass ToDoList {\n constructor(todos) {\n set(this, 'todos', todos);\n }\n\n // using standard ascending sort\n todosSorting = ['name'];\n @sort('todos', 'todosSorting') sortedTodos;\n\n // using descending sort\n todosSortingDesc = ['name:desc'];\n @sort('todos', 'todosSortingDesc') sortedTodosDesc;\n}\n\nlet todoList = new ToDoList([\n { name: 'Unit Test', priority: 2 },\n { name: 'Documentation', priority: 3 },\n { name: 'Release', priority: 1 }\n]);\n\ntodoList.sortedTodos; // [{ name:'Documentation', priority:3 }, { name:'Release', priority:1 }, { name:'Unit Test', priority:2 }]\ntodoList.sortedTodosDesc; // [{ name:'Unit Test', priority:2 }, { name:'Release', priority:1 }, { name:'Documentation', priority:3 }]\n```",
17661
17661
  "itemtype": "method",
17662
17662
  "name": "sort",
17663
17663
  "static": 1,