You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "<html><head></head><body><p>Detects when a specific package of Ember (e.g. 'Application')\nhas fully loaded and is available for extension.</p>\n<p>The provided <code>callback</code> will be called with the <code>name</code> passed\nresolved from a string into the object:</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> { onLoad } <span class=\"keyword\">from</span> <span class=\"string\">'@ember/application'</span>;\n\n<span class=\"title function_\">onLoad</span>(<span class=\"string\">'Ember.Application'</span> <span class=\"keyword\">function</span>(<span class=\"params\">hbars</span>) {\n hbars.<span class=\"title function_\">registerHelper</span>(...);\n});</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
"description": "<html><head></head><body><p>Called when an Ember.js package (e.g Application) has finished\nloading. Triggers any callbacks registered for this event.</p>\n</body></html>",
"description": "<html><head></head><body><p>Forces the passed object to be part of an array. If the object is already\nan array, it will return the object. Otherwise, it will add the object to\nan array. If object is <code>null</code> or <code>undefined</code>, it will return an empty array.</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> { makeArray } <span class=\"keyword\">from</span> <span class=\"string\">'@ember/array'</span>;\n<span class=\"keyword\">import</span> <span class=\"title class_\">ArrayProxy</span> <span class=\"keyword\">from</span> <span class=\"string\">'@ember/array/proxy'</span>;\n\n<span class=\"title function_\">makeArray</span>(); <span class=\"comment\">// []</span>\n<span class=\"title function_\">makeArray</span>(<span class=\"literal\">null</span>); <span class=\"comment\">// []</span>\n<span class=\"title function_\">makeArray</span>(<span class=\"literal\">undefined</span>); <span class=\"comment\">// []</span>\n<span class=\"title function_\">makeArray</span>(<span class=\"string\">'lindsay'</span>); <span class=\"comment\">// ['lindsay']</span>\n<span class=\"title function_\">makeArray</span>([<span class=\"number\">1</span>, <span class=\"number\">2</span>, <span class=\"number\">42</span>]); <span class=\"comment\">// [1, 2, 42]</span>\n\n<span class=\"keyword\">let</span> proxy = <span class=\"title class_\">ArrayProxy</span>.<span class=\"title function_\">create</span>({ <span class=\"attr\">content</span>: [] });\n\n<span class=\"title function_\">makeArray</span>(proxy) === proxy; <span class=\"comment\">// false</span></pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
20
+
"itemtype": "method",
21
+
"name": "makeArray",
22
+
"static": 1,
23
+
"params": [
24
+
{
25
+
"name": "obj",
26
+
"description": "the object",
27
+
"type": "Object"
28
+
}
29
+
],
30
+
"return": {
31
+
"description": "",
32
+
"type": "Array"
33
+
},
34
+
"access": "private",
35
+
"tagname": "",
36
+
"class": "@ember/array",
37
+
"module": "@ember/array"
38
+
},
39
+
{
40
+
"file": "packages/@ember/array/index.ts",
41
+
"line": 140,
42
+
"description": "<html><head></head><body><p>Returns true if the passed object is an array or Array-like.</p>\n<p>Objects are considered Array-like if any of the following are true:</p>\n<ul>\n<li>the object is a native Array</li>\n<li>the object has an objectAt property</li>\n<li>the object is an Object, and has a length property</li>\n</ul>\n<p>Unlike <code>typeOf</code> this method returns true even if the passed object is\nnot formally an array but appears to be array-like (i.e. implements <code>Array</code>)</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> { isArray } <span class=\"keyword\">from</span> <span class=\"string\">'@ember/array'</span>;\n<span class=\"keyword\">import</span> ArrayProxy <span class=\"keyword\">from</span> <span class=\"string\">'@ember/array/proxy'</span>;\n\nisArray(); // <span class=\"keyword\">false</span>\nisArray([]); // <span class=\"keyword\">true</span>\nisArray(ArrayProxy.<span class=\"keyword\">create</span>({ content: [] })); // <span class=\"keyword\">true</span></pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
43
+
"itemtype": "method",
44
+
"name": "isArray",
45
+
"static": 1,
46
+
"params": [
47
+
{
48
+
"name": "obj",
49
+
"description": "The object to test",
50
+
"type": "Object"
51
+
}
52
+
],
53
+
"return": {
54
+
"description": "true if the passed object is an array or Array-like",
55
+
"type": "Boolean"
56
+
},
57
+
"access": "public",
58
+
"tagname": "",
59
+
"class": "@ember/array",
60
+
"module": "@ember/array"
61
+
},
62
+
{
63
+
"file": "packages/@ember/array/index.ts",
64
+
"line": 1859,
65
+
"description": "<html><head></head><body><p>Creates an <code>Ember.NativeArray</code> from an Array-like object.\nDoes not modify the original object's contents. <code>A()</code> is not needed if\n<code>EmberENV.EXTEND_PROTOTYPES</code> is <code>true</code> (the default value). However,\nit is recommended that you use <code>A()</code> when creating addons for\nember or when you can not guarantee that <code>EmberENV.EXTEND_PROTOTYPES</code>\nwill be <code>true</code>.</p>\n<p>Example</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <thead>\n <tr>\n <td colspan=\"2\">component.js</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">import</span> Component from <span class=\"string\">'@ember/component'</span>;\n<span class=\"keyword\">import</span> { A } from <span class=\"string\">'@ember/array'</span>;\n\nexport default Component.extend({\n tagName: <span class=\"string\">'ul'</span>,\n classNames: [<span class=\"string\">'pagination'</span>],\n\n <span class=\"keyword\">init</span>() {\n <span class=\"keyword\">this</span>._super(...arguments);\n\n <span class=\"keyword\">if</span> (!<span class=\"keyword\">this</span>.<span class=\"keyword\">get</span>(<span class=\"string\">'content'</span>)) {\n <span class=\"keyword\">this</span>.<span class=\"keyword\">set</span>(<span class=\"string\">'content'</span>, A());\n <span class=\"keyword\">this</span>.<span class=\"keyword\">set</span>(<span class=\"string\">'otherContent'</span>, A([<span class=\"number\">1</span>,<span class=\"number\">2</span>,<span class=\"number\">3</span>]));\n }\n }\n});</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
"description": "<html><head></head><body><p>Push the object onto the end of the array if it is not already\npresent in the array.</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n</pre></td>\n <td class=\"code\"><pre>let cities = [<span class=\"string\">'Chicago'</span>, <span class=\"string\">'Berlin'</span>];\n\ncities.addObject(<span class=\"string\">'Lima'</span>); // [<span class=\"string\">'Chicago'</span>, <span class=\"string\">'Berlin'</span>, <span class=\"string\">'Lima'</span>]\ncities.addObject(<span class=\"string\">'Berlin'</span>); // [<span class=\"string\">'Chicago'</span>, <span class=\"string\">'Berlin'</span>, <span class=\"string\">'Lima'</span>]</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n</body></html>",
104
+
"itemtype": "method",
105
+
"name": "addObject",
106
+
"params": [
107
+
{
108
+
"name": "obj",
109
+
"description": "object to add, if not already present",
110
+
"type": "*"
111
+
}
112
+
],
113
+
"return": {
114
+
"description": "receiver",
115
+
"type": "EmberArray"
116
+
},
117
+
"access": "public",
118
+
"tagname": "",
119
+
"class": "@ember/array",
120
+
"module": "ember"
121
+
},
122
+
{
123
+
"file": "packages/@ember/array/index.ts",
124
+
"line": 2020,
125
+
"description": "<html><head></head><body><p>Sets the value on the named property for each member. This is more\nergonomic than using other methods defined on this helper. If the object\nimplements Observable, the value will be changed to <code>set(),</code> otherwise\nit will be set directly. <code>null</code> objects are skipped.</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n</pre></td>\n <td class=\"code\"><pre><span class=\"keyword\">let</span> people = [<span class=\"built_in\">{name</span>: <span class=\"string\">'Joe'</span>}, <span class=\"built_in\">{name</span>: <span class=\"string\">'Matt'</span>}];\n\npeople.setEach(<span class=\"string\">'zipCode'</span>, <span class=\"string\">'10011'</span>);\n// [<span class=\"built_in\">{name</span>: <span class=\"string\">'Joe'</span>, zipCode: <span class=\"string\">'10011'</span>}, <span class=\"built_in\">{name</span>: <span class=\"string\">'Matt'</span>, zipCode: <span class=\"string\">'10011'</span>}];</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
126
+
"itemtype": "method",
127
+
"name": "setEach",
128
+
"params": [
129
+
{
130
+
"name": "key",
131
+
"description": "The key to set",
132
+
"type": "String"
133
+
},
134
+
{
135
+
"name": "value",
136
+
"description": "The object to set",
137
+
"type": "Object"
138
+
}
139
+
],
140
+
"return": {
141
+
"description": "receiver",
142
+
"type": "Object"
143
+
},
144
+
"access": "public",
145
+
"tagname": "",
146
+
"class": "@ember/array",
147
+
"module": "ember"
148
+
}
149
+
],
150
+
"events": [],
151
+
"properties": [
152
+
{
153
+
"file": "packages/@ember/array/index.ts",
154
+
"line": 2040,
155
+
"description": "<html><head></head><body><p>This is the handler for the special array content property. If you get\nthis property, it will return this. If you set this property to a new\narray, it will replace the current content.</p>\n<div class=\"highlight javascript\">\n <div class=\"ribbon\"></div>\n <div class=\"scroller\">\n <table class=\"CodeRay\">\n <tbody>\n <tr>\n <td class=\"line-numbers\"><pre>1\n2\n3\n4\n5\n6\n</pre></td>\n <td class=\"code\"><pre>let peopleToMoon = [<span class=\"string\">'Armstrong'</span>, <span class=\"string\">'Aldrin'</span>];\n\npeopleToMoon.get(<span class=\"string\">'[]'</span>); // [<span class=\"string\">'Armstrong'</span>, <span class=\"string\">'Aldrin'</span>]\n\npeopleToMoon.set(<span class=\"string\">'[]'</span>, [<span class=\"string\">'Collins'</span>]); // [<span class=\"string\">'Collins'</span>]\npeopleToMoon.get(<span class=\"string\">'[]'</span>); // [<span class=\"string\">'Collins'</span>]</pre></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n \n</body></html>",
0 commit comments