Skip to content

Commit b58412e

Browse files
committed
Add octane snippets
1 parent c7101f9 commit b58412e

File tree

18 files changed

+2323
-1522
lines changed

18 files changed

+2323
-1522
lines changed

docs/javascript/ember/cheats.md

Lines changed: 0 additions & 811 deletions
This file was deleted.
Lines changed: 379 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,379 @@
1+
# javascript - ember/classic - computed
2+
## Table of Contents
3+
- [alias()](#alias)
4+
- [and()](#and)
5+
- [bool()](#bool)
6+
- [collect()](#collect)
7+
- [empty()](#empty)
8+
- [equal()](#equal)
9+
- [filter()](#filter)
10+
- [filterBy()](#filterby)
11+
- [gt()](#gt)
12+
- [gte()](#gte)
13+
- [intersect()](#intersect)
14+
- [lt()](#lt)
15+
- [lte()](#lte)
16+
- [map()](#map)
17+
- [mapBy()](#mapby)
18+
- [match()](#match)
19+
- [max()](#max)
20+
- [min()](#min)
21+
- [none()](#none)
22+
- [not()](#not)
23+
- [notEmpty()](#notempty)
24+
- [oneWay()](#oneway)
25+
- [or()](#or)
26+
- [readOnly()](#readonly)
27+
- [reads()](#reads)
28+
- [setDiff()](#setdiff)
29+
- [sort()](#sort)
30+
- [sum()](#sum)
31+
- [union()](#union)
32+
- [uniq()](#uniq)
33+
- [uniqBy()](#uniqby)
34+
## Snippets
35+
### `alias()`
36+
**Prefix:** `alias`
37+
38+
**Description**:
39+
```
40+
alias()
41+
```
42+
**Generated code**:
43+
```js
44+
alias('key');
45+
```
46+
### `and()`
47+
**Prefix:** `and`
48+
49+
**Description**:
50+
```
51+
and()
52+
```
53+
**Generated code**:
54+
```js
55+
and('key1', 'key2');
56+
```
57+
### `bool()`
58+
**Prefix:** `bool`
59+
60+
**Description**:
61+
```
62+
bool()
63+
```
64+
**Generated code**:
65+
```js
66+
bool(key);
67+
```
68+
### `collect()`
69+
**Prefix:** `collect`
70+
71+
**Description**:
72+
```
73+
collect()
74+
```
75+
**Generated code**:
76+
```js
77+
collect(keys);
78+
```
79+
### `empty()`
80+
**Prefix:** `empty`
81+
82+
**Description**:
83+
```
84+
empty()
85+
```
86+
**Generated code**:
87+
```js
88+
empty('key');
89+
```
90+
### `equal()`
91+
**Prefix:** `equal`
92+
93+
**Description**:
94+
```
95+
equal()
96+
```
97+
**Generated code**:
98+
```js
99+
equal('key', value);
100+
```
101+
### `filter()`
102+
**Prefix:** `filter`
103+
104+
**Description**:
105+
```
106+
filter()
107+
```
108+
**Generated code**:
109+
```js
110+
filter(key, function(item, index}) {
111+
return item;
112+
}));
113+
```
114+
### `filterBy()`
115+
**Prefix:** `filterBy`
116+
117+
**Description**:
118+
```
119+
filterBy()
120+
```
121+
**Generated code**:
122+
```js
123+
filterBy('key', propertyKey, value);
124+
```
125+
### `gt()`
126+
**Prefix:** `gt`
127+
128+
**Description**:
129+
```
130+
gt()
131+
```
132+
**Generated code**:
133+
```js
134+
gt('key', value);
135+
```
136+
### `gte()`
137+
**Prefix:** `gte`
138+
139+
**Description**:
140+
```
141+
gte()
142+
```
143+
**Generated code**:
144+
```js
145+
gte('key', value);
146+
```
147+
### `intersect()`
148+
**Prefix:** `intersect`
149+
150+
**Description**:
151+
```
152+
intersect()
153+
```
154+
**Generated code**:
155+
```js
156+
intersect('key1', 'key2');
157+
```
158+
### `lt()`
159+
**Prefix:** `lt`
160+
161+
**Description**:
162+
```
163+
lt()
164+
```
165+
**Generated code**:
166+
```js
167+
lt('key', value);
168+
```
169+
### `lte()`
170+
**Prefix:** `lte`
171+
172+
**Description**:
173+
```
174+
lte()
175+
```
176+
**Generated code**:
177+
```js
178+
lte('key', value);
179+
```
180+
### `map()`
181+
**Prefix:** `map`
182+
183+
**Description**:
184+
```
185+
map()
186+
```
187+
**Generated code**:
188+
```js
189+
map(key, function(item, index}) {
190+
return item;
191+
}));
192+
```
193+
### `mapBy()`
194+
**Prefix:** `mapBy`
195+
196+
**Description**:
197+
```
198+
mapBy()
199+
```
200+
**Generated code**:
201+
```js
202+
mapBy('key', 'propertyKey');
203+
```
204+
### `match()`
205+
**Prefix:** `match`
206+
207+
**Description**:
208+
```
209+
match()
210+
```
211+
**Generated code**:
212+
```js
213+
match('key', regEx);
214+
```
215+
### `max()`
216+
**Prefix:** `max`
217+
218+
**Description**:
219+
```
220+
max()
221+
```
222+
**Generated code**:
223+
```js
224+
max('key');
225+
```
226+
### `min()`
227+
**Prefix:** `min`
228+
229+
**Description**:
230+
```
231+
min()
232+
```
233+
**Generated code**:
234+
```js
235+
min('key');
236+
```
237+
### `none()`
238+
**Prefix:** `none`
239+
240+
**Description**:
241+
```
242+
none()
243+
```
244+
**Generated code**:
245+
```js
246+
none('key');
247+
```
248+
### `not()`
249+
**Prefix:** `not`
250+
251+
**Description**:
252+
```
253+
not()
254+
```
255+
**Generated code**:
256+
```js
257+
not('key');
258+
```
259+
### `notEmpty()`
260+
**Prefix:** `notEmpty`
261+
262+
**Description**:
263+
```
264+
notEmpty()
265+
```
266+
**Generated code**:
267+
```js
268+
notEmpty('key');
269+
```
270+
### `oneWay()`
271+
**Prefix:** `oneWay`
272+
273+
**Description**:
274+
```
275+
oneWay()
276+
```
277+
**Generated code**:
278+
```js
279+
oneWay('key');
280+
```
281+
### `or()`
282+
**Prefix:** `or`
283+
284+
**Description**:
285+
```
286+
or()
287+
```
288+
**Generated code**:
289+
```js
290+
or('key1', 'key2');
291+
```
292+
### `readOnly()`
293+
**Prefix:** `readOnly`
294+
295+
**Description**:
296+
```
297+
readOnly()
298+
```
299+
**Generated code**:
300+
```js
301+
readOnly('key');
302+
```
303+
### `reads()`
304+
**Prefix:** `reads`
305+
306+
**Description**:
307+
```
308+
reads()
309+
```
310+
**Generated code**:
311+
```js
312+
reads('key');
313+
```
314+
### `setDiff()`
315+
**Prefix:** `setDiff`
316+
317+
**Description**:
318+
```
319+
setDiff()
320+
```
321+
**Generated code**:
322+
```js
323+
setDiff('key1', 'key2');
324+
```
325+
### `sort()`
326+
**Prefix:** `sort`
327+
328+
**Description**:
329+
```
330+
sort()
331+
```
332+
**Generated code**:
333+
```js
334+
sort('itemsKey', 'sortDefinition');
335+
```
336+
### `sum()`
337+
**Prefix:** `sum`
338+
339+
**Description**:
340+
```
341+
sum()
342+
```
343+
**Generated code**:
344+
```js
345+
sum('key');
346+
```
347+
### `union()`
348+
**Prefix:** `union`
349+
350+
**Description**:
351+
```
352+
union()
353+
```
354+
**Generated code**:
355+
```js
356+
union('key1', 'key2');
357+
```
358+
### `uniq()`
359+
**Prefix:** `uniq`
360+
361+
**Description**:
362+
```
363+
uniq()
364+
```
365+
**Generated code**:
366+
```js
367+
uniq('key', 'propertyKey');
368+
```
369+
### `uniqBy()`
370+
**Prefix:** `uniqBy`
371+
372+
**Description**:
373+
```
374+
uniqBy()
375+
```
376+
**Generated code**:
377+
```js
378+
uniqBy('key');
379+
```

0 commit comments

Comments
 (0)