|
1 | 1 | { |
2 | | - "arrayFilterEqual": { |
| 2 | + "array.Filter.Equal": { |
3 | 3 | "prefix": "arfeq", |
4 | 4 | "body": "const ${1:newArray} = ${2:array}.filter((${3:element}) => ${3:element} === ${4:value})$0", |
5 | 5 | "description": "Array Filter compare equal" |
6 | 6 | }, |
7 | | - "arrayFilterNotEqual": { |
| 7 | + "array.Filter.NotEqual": { |
8 | 8 | "prefix": "arfne", |
9 | 9 | "body": "const ${1:newArray} = ${2:array}.filter((${3:element}) => ${3:element} !== ${4:value})$0", |
10 | 10 | "description": "Array Filter compare not equal" |
11 | 11 | }, |
12 | | - "arrayFilterObjectEqual": { |
| 12 | + "array.Filter.Object.Equal": { |
13 | 13 | "prefix": "arfoeq", |
14 | 14 | "body": "const ${1:newArray} = ${2:array}.filter((${3:element}) => ${3:element}.${4:prop} === ${5:value})$0", |
15 | 15 | "description": "Array Filter Object compare equal" |
16 | 16 | }, |
17 | | - "arrayFilterObjectNotEqual": { |
| 17 | + "array.Filter.Object.NotEqual": { |
18 | 18 | "prefix": "arfone", |
19 | 19 | "body": "const ${1:newArray} = ${2:array}.filter((${3:element}) => ${3:element}.${4:prop} !== ${5:value})$0", |
20 | 20 | "description": "Array Filter Object compare not equal" |
21 | 21 | }, |
22 | | - "arraySortNumberAsc": { |
| 22 | + "array.Sort.Number.Asc": { |
23 | 23 | "prefix": "arsna", |
24 | 24 | "body": "${1:array}.sort((${2:a}, ${3:z}) => ${2:a} - ${3:z})$0", |
25 | | - "description": "Array sort numbers ascending" |
| 25 | + "description": "Array sort (mutate) numbers ascending" |
26 | 26 | }, |
27 | | - "arraySortNumberDesc": { |
| 27 | + "array.Sort.Number.Desc": { |
28 | 28 | "prefix": "arsnd", |
29 | 29 | "body": "${1:array}.sort((${2:a}, ${3:z}) => ${3:z} - ${2:a})$0", |
30 | | - "description": "Array sort numbers descending" |
| 30 | + "description": "Array sort (mutate) numbers descending" |
31 | 31 | }, |
32 | | - "arrayUniqueValues": { |
| 32 | + "array.ToSorted.Number.Asc": { |
| 33 | + "prefix": "artsna", |
| 34 | + "body": "${1:array}.toSorted((${2:a}, ${3:z}) => ${2:a} - ${3:z})$0", |
| 35 | + "description": "Array sort (not mutate) numbers ascending" |
| 36 | + }, |
| 37 | + "array.ToSorted.Number.Desc": { |
| 38 | + "prefix": "artsnd", |
| 39 | + "body": "${1:array}.toSorted((${2:a}, ${3:z}) => ${3:z} - ${2:a})$0", |
| 40 | + "description": "Array sort (not mutate) numbers descending" |
| 41 | + }, |
| 42 | + "array.UniqueValues": { |
33 | 43 | "prefix": "aruv", |
34 | 44 | "body": "const ${1:newArray} = ${2:array}.filter((${3:current}, ${4:index}, ${5:arr}) => ${5:arr}.indexOf(${3:current}) == ${4:index})$0", |
35 | 45 | "description": "Array unique values" |
|
0 commit comments