File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# JavaScript
2- ## VS Code JavaScript (ES6) snippets
2+ ## VS Code JavaScript (ES6) snippets
33-------------------
44This 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] ` |
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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 " ,
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 },
You can’t perform that action at this time.
0 commit comments