Skip to content

Commit 1f8d69c

Browse files
authored
Merge pull request #19 from deinsoftware/dev
Dev
2 parents 8a85b6b + 6665011 commit 1f8d69c

File tree

9 files changed

+165
-123
lines changed

9 files changed

+165
-123
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
"arrowfunction",
2929
"arsna",
3030
"arsnd",
31+
"artsna",
32+
"artsnd",
3133
"aruv",
3234
"caaf",
3335
"caaft",
@@ -47,6 +49,7 @@
4749
"kural",
4850
"paypal",
4951
"pranav",
52+
"SWPM",
5053
"volta",
5154
"vuejs"
5255
],

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ Fixed for any bug fixes.
99
Security to invite users to upgrade in case of vulnerabilities.
1010
-->
1111

12+
## 3.3.0 - 2023/04/15
13+
14+
### Added
15+
16+
- tab jump position icon
17+
- keyboards tricks on README
18+
- `toSorted` on array snippets
19+
20+
### Fixed
21+
22+
- `cafe` snippets on JavaScript and TypeScript
23+
24+
### Changed
25+
26+
- rename snippets identifier
27+
1228
## 3.2.0 - 2023/02/27
1329

1430
### Added

README.md

Lines changed: 78 additions & 65 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "arrow-function-snippets",
33
"description": "VS Code Arrow function snippets for JS and TS",
4-
"version": "3.2.0",
4+
"version": "3.3.0",
55
"displayName": "Arrow Function Snippets",
66
"publisher": "deinsoftware",
77
"icon": "images/light-icon.png",

snippets/arrays.json

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,45 @@
11
{
2-
"arrayFilterEqual": {
2+
"array.Filter.Equal": {
33
"prefix": "arfeq",
44
"body": "const ${1:newArray} = ${2:array}.filter((${3:element}) => ${3:element} === ${4:value})$0",
55
"description": "Array Filter compare equal"
66
},
7-
"arrayFilterNotEqual": {
7+
"array.Filter.NotEqual": {
88
"prefix": "arfne",
99
"body": "const ${1:newArray} = ${2:array}.filter((${3:element}) => ${3:element} !== ${4:value})$0",
1010
"description": "Array Filter compare not equal"
1111
},
12-
"arrayFilterObjectEqual": {
12+
"array.Filter.Object.Equal": {
1313
"prefix": "arfoeq",
1414
"body": "const ${1:newArray} = ${2:array}.filter((${3:element}) => ${3:element}.${4:prop} === ${5:value})$0",
1515
"description": "Array Filter Object compare equal"
1616
},
17-
"arrayFilterObjectNotEqual": {
17+
"array.Filter.Object.NotEqual": {
1818
"prefix": "arfone",
1919
"body": "const ${1:newArray} = ${2:array}.filter((${3:element}) => ${3:element}.${4:prop} !== ${5:value})$0",
2020
"description": "Array Filter Object compare not equal"
2121
},
22-
"arraySortNumberAsc": {
22+
"array.Sort.Number.Asc": {
2323
"prefix": "arsna",
2424
"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"
2626
},
27-
"arraySortNumberDesc": {
27+
"array.Sort.Number.Desc": {
2828
"prefix": "arsnd",
2929
"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"
3131
},
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": {
3343
"prefix": "aruv",
3444
"body": "const ${1:newArray} = ${2:array}.filter((${3:current}, ${4:index}, ${5:arr}) => ${5:arr}.indexOf(${3:current}) == ${4:index})$0",
3545
"description": "Array unique values"

snippets/arrow.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,62 @@
44
"body": "() => $0",
55
"description": "Arrow function (implicit return)"
66
},
7-
"arrowFunctionWithArguments": {
7+
"arrowFunction.WithArguments": {
88
"prefix": "afa",
99
"body": "(${1:arg}) => $0",
1010
"description": "Arrow function (implicit return) with arguments"
1111
},
12-
"arrowFunctionWithArgumentDestructuring": {
12+
"arrowFunction.WithArgument.Destructuring": {
1313
"prefix": "afad",
1414
"body": "({${1:prop}, ${2:prop}}) => $0",
1515
"description": "Arrow function (implicit return) with argument destructuring"
1616
},
17-
"arrowFunctionObject": {
17+
"arrowFunction.Object": {
1818
"prefix": "afo",
1919
"body": "() => ( { ${1:prop}:${0:value}} )",
2020
"description": "Arrow function (object literal implicit return)"
2121
},
22-
"arrowFunctionObjectWithArguments": {
22+
"arrowFunction.Object.WithArguments": {
2323
"prefix": "afoa",
2424
"body": "(${1:arg}) => ( { ${2:prop}:${0:value}} )",
2525
"description": "Arrow function (object literal implicit return) with arguments"
2626
},
27-
"arrowFunctionExplicit": {
27+
"arrowFunction.Explicit": {
2828
"prefix": "afe",
2929
"body": ["() => {", "\t${1:return} $0", "}"],
3030
"description": "Arrow function (explicit return)"
3131
},
32-
"arrowFunctionExplicitWithArguments": {
32+
"arrowFunction.Explicit.WithArguments": {
3333
"prefix": "afea",
3434
"body": ["(${1:arg}) => {", "\t${2:return} $0", "}"],
3535
"description": "Arrow function (explicit return) with arguments"
3636
},
37-
"arrowFunctionExplicitWithArgumentDestructuring": {
37+
"arrowFunction.Explicit.WithArgument.Destructuring": {
3838
"prefix": "afead",
3939
"body": ["({${1:prop}, ${2:prop}}) => {", "\t${3:return} $0", "}"],
4040
"description": "Arrow function (explicit return) with argument destructuring"
4141
},
42-
"arrowFunctionExplicitEmpty": {
42+
"arrowFunction.Explicit.Empty": {
4343
"prefix": "afee",
4444
"body": ["() => {", "\t$0", "}"],
4545
"description": "Arrow function (without return)"
4646
},
47-
"arrowFunctionExplicitEmptyWithArguments": {
47+
"arrowFunction.Explicit.Empty.WithArguments": {
4848
"prefix": "afeea",
4949
"body": ["(${1:arg}) => {", "\t$0", "}"],
5050
"description": "Arrow function (without return) with arguments"
5151
},
52-
"arrowFunctionParentheses": {
52+
"arrowFunction.Parentheses": {
5353
"prefix": "afp",
5454
"body": ["() => {", "\t( ${0} )", "}"],
5555
"description": "Arrow function (explicit without return)"
5656
},
57-
"arrowFunctionParenthesesWithArguments": {
57+
"arrowFunction.Parentheses.WithArguments": {
5858
"prefix": "afpa",
5959
"body": ["(${1:arg}) => {", "\t( ${0} )", "}"],
6060
"description": "Arrow function (explicit without return) with arguments"
6161
},
62-
"arrowFunctionImmediatelyInvoque": {
62+
"arrowFunction.ImmediatelyInvoque": {
6363
"prefix": ["iiaf", "afii"],
6464
"body": "(() => $0)()",
6565
"description": "Arrow function Immediately Invoke"
@@ -69,47 +69,47 @@
6969
"body": "async () => $0",
7070
"description": "Arrow async function"
7171
},
72-
"arrowAsyncFunctionWithArguments": {
72+
"arrowAsyncFunction.WithArguments": {
7373
"prefix": "aafa",
7474
"body": "async (${1:arg}) => $0",
7575
"description": "Arrow async function (implicit return) with arguments"
7676
},
77-
"arrowAsyncFunctionImplicitWithArgumentDestructuring": {
77+
"arrowAsyncFunction.Implicit.WithArgument.Destructuring": {
7878
"prefix": "aafad",
7979
"body": "async ({ ${1:prop} }) => $0",
8080
"description": "Arrow async function (explicit return) with argument destructuring"
8181
},
82-
"arrowAsyncFunctionExplicitReturn": {
82+
"arrowAsyncFunction.Explicit.Return": {
8383
"prefix": "aafe",
8484
"body": ["async () => {", "\t${1:return} $0", "}"],
8585
"description": "Arrow async function (explicit with return)"
8686
},
87-
"arrowAsyncFunctionExplicitWithArguments": {
87+
"arrowAsyncFunction.Explicit.WithArguments": {
8888
"prefix": "aafea",
8989
"body": ["async (${1:arg}) => {", "\t${2:return} $0", "}"],
9090
"description": "Arrow async function (explicit without return) with arguments"
9191
},
92-
"arrowAsyncFunctionExplicitWithArgumentDestructuring": {
92+
"arrowAsyncFunction.Explicit.WithArgument.Destructuring": {
9393
"prefix": "aafead",
9494
"body": ["async ({ ${1:prop}, ${2:prop} }) => {", "\t${3:return} $0", "}"],
9595
"description": "Arrow async function (explicit return) with argument destructuring"
9696
},
97-
"arrowAsyncFunctionExplicitEmpty": {
97+
"arrowAsyncFunction.Explicit.Empty": {
9898
"prefix": "aafee",
9999
"body": ["async () => {", "\t$0", "}"],
100100
"description": "Arrow async function (without return)"
101101
},
102-
"arrowAsyncFunctionExplicitEmptyWithArguments": {
102+
"arrowAsyncFunction.Explicit.Empty.WithArguments": {
103103
"prefix": "aafeea",
104104
"body": ["async (${1:arg}) => {", "\t$0", "}"],
105105
"description": "Arrow async function (without return) with arguments"
106106
},
107-
"arrowAsyncAwaitFunctionExplicitWithArguments": {
107+
"arrowAsyncAwaitFunction.Explicit.WithArguments": {
108108
"prefix": "aaafea",
109109
"body": ["async (${1:arg}) => {", "\tconst ${2:name} = await ${0}", "}"],
110110
"description": "Arrow async-await function (explicit without return) with arguments"
111111
},
112-
"arrowAsyncFunctionImmediatelyInvoque": {
112+
"arrowAsyncFunction.ImmediatelyInvoque": {
113113
"prefix": ["iiaaf", "aafii"],
114114
"body": "(async () => $0)()",
115115
"description": "Arrow async function Immediately Invoke"

snippets/function-js.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
{
2-
"exportDefaultArrowFunction": {
2+
"export.Default.ArrowFunction": {
33
"prefix": "edaf",
44
"body": ["export default ($1) => {", "\t$0", "}"],
55
"description": "Export Default Anonymous Arrow function"
66
},
7-
"exportDefaultAsyncArrowFunction": {
7+
"export.Default.AsyncArrowFunction": {
88
"prefix": "edaaf",
99
"body": ["export default async ($1) => {", "\t$0", "}"],
1010
"description": "Export Default Async Anonymous Arrow function"
1111
},
12-
"constantArrowFunction": {
12+
"constant.ArrowFunction": {
1313
"prefix": "caf",
1414
"body": ["const ${1:name} = ($2) => $0"],
1515
"description": "Constant Arrow function (implicit return)"
1616
},
17-
"constantArrowFunctionExplicit": {
17+
"constant.ArrowFunction.Explicit": {
1818
"prefix": "cafe",
19-
"body": ["const ${1:name} = ($2) => {", "\treturn $0", "}"],
19+
"body": ["const ${1:name} = ($2) => {", "\t${3:return} $0", "}"],
2020
"description": "Constant Arrow function (explicit return)"
2121
},
22-
"exportConstantArrowFunction": {
22+
"export.Constant.ArrowFunction": {
2323
"prefix": "ecaf",
2424
"body": ["export const ${1:name} = ($2) => {", "\t$0", "}"],
2525
"description": "Export Constant Arrow function"
2626
},
27-
"constantAsyncArrowFunction": {
27+
"constant.AsyncArrowFunction": {
2828
"prefix": "caaf",
2929
"body": ["const ${1:name} = async ($2) => {", "\t$0", "}"],
3030
"description": "Constant Async Arrow function"
3131
},
32-
"exportConstantAsyncArrowFunction": {
32+
"export.Constant.AsyncArrowFunction": {
3333
"prefix": "ecaaf",
3434
"body": ["export const ${1:name} = async ($2) => {", "\t$0", "}"],
3535
"description": "Export Constant Async Arrow function"

snippets/function-ts.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
{
2-
"exportDefaultArrowFunction": {
2+
"export.Default.ArrowFunction": {
33
"prefix": "edaf",
44
"body": ["export default ($1) => {", "\t$0", "}"],
55
"description": "Export Default Anonymous Arrow function"
66
},
7-
"exportDefaultAsyncArrowFunction": {
7+
"export.Default.AsyncArrowFunction": {
88
"prefix": "edaaf",
99
"body": ["export default async ($1) => {", "\t$0", "}"],
1010
"description": "Export Default Async Anonymous Arrow function"
1111
},
12-
"constantArrowFunction": {
12+
"constant.ArrowFunction": {
1313
"prefix": "caf",
1414
"body": ["const ${1:name} = ($2) => $0"],
1515
"description": "Constant Arrow function (implicit return)"
1616
},
17-
"constantArrowFunctionExplicit": {
17+
"constant.ArrowFunction.Explicit": {
1818
"prefix": "cafe",
19-
"body": ["const ${1:name} = ($2) => {", "\treturn $0", "}"],
19+
"body": ["const ${1:name} = ($2) => {", "\t${3:return} $0", "}"],
2020
"description": "Constant Arrow function (explicit return)"
2121
},
22-
"exportConstantArrowFunction": {
22+
"export.Constant.ArrowFunction": {
2323
"prefix": "ecaf",
2424
"body": ["export const ${1:name} = ($2) => {", "\t$0", "}"],
2525
"description": "Export Constant Arrow function"
2626
},
27-
"constantAsyncArrowFunction": {
27+
"constant.Async.ArrowFunction": {
2828
"prefix": "caaf",
2929
"body": ["const ${1:name} = async ($2) => {", "\t$0", "}"],
3030
"description": "Constant Async Arrow function"
3131
},
32-
"exportConstantAsyncArrowFunction": {
32+
"export.Constant.AsyncArrowFunction": {
3333
"prefix": "ecaaf",
3434
"body": ["export const ${1:name} = async ($2) => {", "\t$0", "}"],
3535
"description": "Export Constant Async Arrow function"
3636
},
37-
"constantArrowFunctionType": {
37+
"constant.ArrowFunction.Type": {
3838
"prefix": "caft",
3939
"body": [
4040
"const ${1:name} = ($2) : ${3|string,number,boolean,custom|} => {",
@@ -43,7 +43,7 @@
4343
],
4444
"description": "Constant Arrow function (explicit return type)"
4545
},
46-
"exportConstantArrowFunctionType": {
46+
"export.ConstantArrow.Function.Type": {
4747
"prefix": "ecaft",
4848
"body": [
4949
"export const ${1:name} = ($2) : ${3|string,number,boolean,custom|} => {",
@@ -52,7 +52,7 @@
5252
],
5353
"description": "Export Constant Arrow function (explicit return type)"
5454
},
55-
"constantAsyncArrowFunctionType": {
55+
"constant.AsyncArrowFunction.Type": {
5656
"prefix": "caaft",
5757
"body": [
5858
"const ${1:name} = async ($2) : ${3|string,number,boolean,custom|} => {",
@@ -61,7 +61,7 @@
6161
],
6262
"description": "Constant Async Arrow function (explicit return type)"
6363
},
64-
"exportConstantAsyncArrowFunctionType": {
64+
"export.Constant.AsyncArrowFunction.Type": {
6565
"prefix": "ecaaft",
6666
"body": [
6767
"export const ${1:name} = async ($2) : ${3|string,number,boolean,custom|} => {",

0 commit comments

Comments
 (0)