My current custom JavaScript snippets for Visual Studio Code.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Print to console": { | |
"prefix": "clog", | |
"body": [ | |
"console.log($1);$0" | |
], | |
"description": "Console log" | |
}, | |
"CommonJS require": { | |
"prefix": "creq", | |
"body": [ | |
"const ${1:fs} = require('${2:$1}');$0" | |
], | |
"description": "Insert a commonjs require statement" | |
}, | |
"async function": { | |
"prefix": "afunc", | |
"body": [ | |
"async function ${1:func}($2) {", | |
"$0", | |
"}" | |
], | |
"description": "Insert an async function declaration." | |
}, | |
"import statement":{ | |
"prefix": "import", | |
"body": "import ${2:{ $0 \\}} from '$1';", | |
"description": "Make an import statement." | |
}, | |
"export default": { | |
"prefix": "ed", | |
"body": "export default $0", | |
"description": "Writes out 'export default'" | |
}, | |
"arrow function": { | |
"prefix": "arf", | |
"body": "() => ${1:{ $0 \\}}", | |
"description": "Writes an arrow function." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment