-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patharray.json
More file actions
189 lines (189 loc) · 7.82 KB
/
array.json
File metadata and controls
189 lines (189 loc) · 7.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
{
"data": {
"id": "ember-6.12.0-beta.2-@ember/array",
"type": "class",
"attributes": {
"name": "@ember/array",
"shortname": "@ember/array",
"classitems": [],
"plugins": [],
"extensions": [],
"plugin_for": [],
"extension_for": [],
"module": "ember",
"namespace": "",
"methods": [
{
"file": "packages/@ember/array/lib/make-array.ts",
"line": 5,
"description": "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 `null` or `undefined`, it will return an empty array.\n\n```javascript\nimport { makeArray } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nmakeArray(); // []\nmakeArray(null); // []\nmakeArray(undefined); // []\nmakeArray('lindsay'); // ['lindsay']\nmakeArray([1, 2, 42]); // [1, 2, 42]\n\nlet proxy = ArrayProxy.create({ content: [] });\n\nmakeArray(proxy) === proxy; // false\n```",
"itemtype": "method",
"name": "makeArray",
"static": 1,
"params": [
{
"name": "obj",
"description": "the object",
"type": "Object"
}
],
"return": {
"description": "",
"type": "Array"
},
"access": "private",
"tagname": "",
"class": "@ember/array",
"module": "@ember/array"
},
{
"file": "packages/@ember/array/index.ts",
"line": 139,
"description": "Returns true if the passed object is an array or Array-like.\n\nObjects are considered Array-like if any of the following are true:\n\n - the object is a native Array\n - the object has an objectAt property\n - the object is an Object, and has a length property\n\nUnlike `typeOf` this method returns true even if the passed object is\nnot formally an array but appears to be array-like (i.e. implements `Array`)\n\n```javascript\nimport { isArray } from '@ember/array';\nimport ArrayProxy from '@ember/array/proxy';\n\nisArray(); // false\nisArray([]); // true\nisArray(ArrayProxy.create({ content: [] })); // true\n```",
"itemtype": "method",
"name": "isArray",
"static": 1,
"params": [
{
"name": "obj",
"description": "The object to test",
"type": "Object"
}
],
"return": {
"description": "true if the passed object is an array or Array-like",
"type": "Boolean"
},
"access": "public",
"tagname": "",
"class": "@ember/array",
"module": "@ember/array"
},
{
"file": "packages/@ember/array/index.ts",
"line": 1858,
"description": "Creates an `NativeArray` from an Array-like object.\nDoes not modify the original object's contents.\n\nExample\n\n```js {data-filename=app/components/my-component.js}\nimport Component from '@ember/component';\nimport { A } from '@ember/array';\n\nexport default Component.extend({\n tagName: 'ul',\n classNames: ['pagination'],\n\n init() {\n this._super(...arguments);\n\n if (!this.get('content')) {\n this.set('content', A());\n this.set('otherContent', A([1,2,3]));\n }\n }\n});\n```",
"itemtype": "method",
"name": "A",
"static": 1,
"return": {
"description": "",
"type": "Ember.NativeArray"
},
"access": "public",
"tagname": "",
"class": "@ember/array",
"module": "@ember/array"
},
{
"file": "packages/@ember/array/index.ts",
"line": 1975,
"description": "Remove all occurrences of an object in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin', 'Lima', 'Chicago'];\n\ncities.removeObject('Chicago'); // ['Berlin', 'Lima']\ncities.removeObject('Lima'); // ['Berlin']\ncities.removeObject('Tokyo') // ['Berlin']\n```",
"itemtype": "method",
"name": "removeObject",
"params": [
{
"name": "obj",
"description": "object to remove",
"type": "*"
}
],
"return": {
"description": "receiver",
"type": "EmberArray"
},
"access": "public",
"tagname": "",
"class": "@ember/array",
"module": "ember"
},
{
"file": "packages/@ember/array/index.ts",
"line": 1996,
"description": "Push the object onto the end of the array if it is not already\npresent in the array.\n\n```javascript\nlet cities = ['Chicago', 'Berlin'];\n\ncities.addObject('Lima'); // ['Chicago', 'Berlin', 'Lima']\ncities.addObject('Berlin'); // ['Chicago', 'Berlin', 'Lima']\n```",
"itemtype": "method",
"name": "addObject",
"params": [
{
"name": "obj",
"description": "object to add, if not already present",
"type": "*"
}
],
"return": {
"description": "receiver",
"type": "EmberArray"
},
"access": "public",
"tagname": "",
"class": "@ember/array",
"module": "ember"
},
{
"file": "packages/@ember/array/index.ts",
"line": 2017,
"description": "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 `set(),` otherwise\nit will be set directly. `null` objects are skipped.\n\n```javascript\nlet people = [{name: 'Joe'}, {name: 'Matt'}];\n\npeople.setEach('zipCode', '10011');\n// [{name: 'Joe', zipCode: '10011'}, {name: 'Matt', zipCode: '10011'}];\n```",
"itemtype": "method",
"name": "setEach",
"params": [
{
"name": "key",
"description": "The key to set",
"type": "String"
},
{
"name": "value",
"description": "The object to set",
"type": "Object"
}
],
"return": {
"description": "receiver",
"type": "Object"
},
"access": "public",
"tagname": "",
"class": "@ember/array",
"module": "ember"
}
],
"events": [],
"properties": [
{
"file": "packages/@ember/array/index.ts",
"line": 2037,
"description": "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.\n\n```javascript\nlet peopleToMoon = ['Armstrong', 'Aldrin'];\n\npeopleToMoon.get('[]'); // ['Armstrong', 'Aldrin']\n\npeopleToMoon.set('[]', ['Collins']); // ['Collins']\npeopleToMoon.get('[]'); // ['Collins']\n```",
"itemtype": "property",
"name": "[]",
"return": {
"description": "this"
},
"access": "public",
"tagname": "",
"class": "@ember/array",
"module": "ember"
}
]
},
"relationships": {
"parent-class": {
"data": null
},
"descendants": {
"data": []
},
"module": {
"data": {
"id": "ember-6.12.0-beta.2-ember",
"type": "module"
}
},
"project-version": {
"data": {
"id": "ember-6.12.0-beta.2",
"type": "project-version"
}
}
}
}
}