Created
June 30, 2015 00:47
-
-
Save drudge/8ec7a1f38d8a50c4d39b to your computer and use it in GitHub Desktop.
VSCode Node snippets
This file contains hidden or 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
{ | |
"Comment file": { | |
"prefix": "cf", | |
"body": [ | |
"/*!", | |
" * ${1:Project Name}", | |
" * Copyright(c) 2015 ${2:Author Name} <${3:Author Email}>", | |
" * MIT Licensed", | |
" */", | |
"$0" | |
], | |
"description": "JSDoc file header" | |
}, | |
"Comment block": { | |
"prefix": "cb", | |
"body": [ | |
"/**", | |
" * ${1:Description}", | |
" */", | |
"$0" | |
], | |
"description": "JSDoc block comment" | |
}, | |
"Comment method": { | |
"prefix": "c", | |
"body": [ | |
"/**", | |
" * ${1:Description}", | |
" *", | |
" * @param {${2:Type}} ${3:name}", | |
" * @return {${4:Type}}", | |
" * @api ${5:public}", | |
" */", | |
"$0" | |
], | |
"description": "JSDoc method comment" | |
}, | |
"Module dependencies": { | |
"prefix": "md", | |
"body": [ | |
"/**", | |
" * Module dependencies.", | |
" */", | |
"", | |
"var ${1:name} = require('${2:module}');", | |
"$0" | |
], | |
"description": "JSDoc module dependencies" | |
}, | |
"Console log": { | |
"prefix": "l", | |
"body": [ | |
"console.log($0);" | |
], | |
"description": "Console log" | |
}, | |
"Console error": { | |
"prefix": "e", | |
"body": [ | |
"console.error($0);" | |
], | |
"description": "Console error" | |
}, | |
"Require": { | |
"prefix": "r", | |
"body": [ | |
"require('${1:module}')" | |
], | |
"description": "Require" | |
}, | |
"Set Timeout": { | |
"prefix": "st", | |
"body": [ | |
"setTimeout(function() {", | |
" $0", | |
"}, ${1:ms});" | |
], | |
"description": "Set timeout" | |
}, | |
"Event Listener": { | |
"prefix": "on", | |
"body": [ | |
"on('${1:event}', function($2) {", | |
" $0", | |
"});" | |
], | |
"description": "Event Listener" | |
}, | |
"Object keys": { | |
"prefix": "ok", | |
"body": [ | |
"Object.keys(${1:obj})" | |
], | |
"description": "Object keys" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment