Skip to content

Commit 1d8b09c

Browse files
committed
#2 Upgrade the version and change the prefix for create an anonymous function
1 parent c9bc987 commit 1d8b09c

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# JavaScript
2-
## VS Code JavaScript (ES6) snippets
2+
## VS Code JavaScript (ES6) snippets
33
-------------------
44
This extension contains code snippets for JavaScript in ES6 syntax for [Vs Code][code] editor (supports both JavaScript and TypeScript).
55

@@ -44,7 +44,7 @@ Below is a list of all available snippets and the triggers of each one. The **
4444
| `fre→` | forEach loop in ES6 syntax `array.forEach(currentItem => {})`|
4545
| `fof→` | for ... of loop `for(let item of object) {}` |
4646
| `fin→` | for ... in loop `for(let item in object) {}` |
47-
| `afn→` | creates an anonymous function `(params) => {}` |
47+
| `anfn→` | creates an anonymous function `(params) => {}` |
4848
| `nfn→` | creates a named function `const add = (params) => {}` |
4949
| `dob→` | desctucting object syntax `const {rename} = fs` |
5050
| `dar→` | desctucting array syntax `const [first, second] = [1,2]` |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "JavaScriptSnippets",
33
"description": "Code snippets for JavaScript in ES6 syntax",
4-
"version": "1.0.0",
4+
"version": "1.1.0",
55
"displayName": "JavaScript (ES6) code snippets",
66
"publisher": "xabikos",
77
"icon": "images/javascript.png",

snippets/snippets.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,32 @@
88
"prefix": "imd",
99
"body": "import { $1 } from '${2:module}';$0",
1010
"description": "Imports only a portion of the module in ES6 syntax"
11-
},
11+
},
1212
"importEverything": {
1313
"prefix": "ime",
1414
"body": "import * as ${1:alias} from '${2:module}';$0",
1515
"description": "Imports everything as alias from the module in ES6 syntax"
16-
},
16+
},
1717
"importAs": {
1818
"prefix": "ima",
1919
"body": "import {${1:originalName} as ${2:alias} } from '${3:module}';$0",
2020
"description": "Imports a specific portion of the module by assigning a local alias in ES6 syntax"
21-
},
21+
},
2222
"exportNamedFunction": {
2323
"prefix": "enf",
2424
"body": "export const ${1:functionName} = (${2:params}) => {\n\t$0\n};\n",
2525
"description": "Export named function in ES6 syntax"
26-
},
26+
},
2727
"exportDefaultFunction": {
2828
"prefix": "edf",
2929
"body": "export default (${1:params}) => {\n\t$0\n};\n",
3030
"description": "Export default function in ES6 syntax"
31-
},
31+
},
3232
"exportClass": {
3333
"prefix": "ecl",
3434
"body": "export default class ${1:className} {\n\t$0\n};\n",
3535
"description": "Export default class in ES6 syntax"
36-
},
36+
},
3737
"exportClassExtends": {
3838
"prefix": "ece",
3939
"body": "export default class ${1:className} extends ${2:baseclassName} {\n\t$0\n};\n",
@@ -77,7 +77,7 @@
7777
"description": "Iterating over property values of iterable objects"
7878
},
7979
"anonymousFunction": {
80-
"prefix": "afn",
80+
"prefix": "anfn",
8181
"body": "(${1:params}) => {\n\t${2}\n}",
8282
"description": "Creates an anonymous function in ES6 syntax"
8383
},

0 commit comments

Comments
 (0)