-
Notifications
You must be signed in to change notification settings - Fork 10
/
iterables.cson
57 lines (51 loc) · 1.19 KB
/
iterables.cson
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
".source.js, .source.jsx, .source.ts":
"forEach loop":
prefix: "fe"
body: "${1:iterable}.forEach(${2:iterator})"
"chain forEach":
prefix: ".fe"
body: ".forEach(${1:iterator})"
"map":
prefix: "map"
body: "${1:iterable}.map(${2:iterator})"
"chain map":
prefix: ".map"
body: ".map(${1:iterator})"
"reduce":
prefix: "reduce"
body: """
${1:iterable}.reduce((${2:previous}, ${3:current}) => {
${0}
}${4:, initial})
"""
"chain reduce":
prefix: ".reduce"
body: """
.reduce((${1:previous}, ${2:current}) => {
${0}
}${3:, initial})
"""
"filter":
prefix: "filter"
body: "${1:iterable}.filter(${2:iterator})"
"chain filter":
prefix: ".filter"
body: ".filter(${1:iterator})"
"find":
prefix: "find"
body: "${1:iterable}.find(${2:iterator})"
"chain find":
prefix: ".find"
body: ".find(${1:iterator})"
"every":
prefix: "every"
body: "${1:iterable}.every(${2:iterator})"
"chain every":
prefix: ".every"
body: ".every(${1:iterator})"
"some":
prefix: "some"
body: "${1:iterable}.some(${2:iterator})"
"chain some":
prefix: ".some"
body: ".some(${1:iterator})"