Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My current custom JavaScript snippets for Visual Studio Code.
{
"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