Last active
December 6, 2016 10:34
-
-
Save tlareg/4f5785aa47b4228a961abd46935f689c to your computer and use it in GitHub Desktop.
VSC js snippets
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
{ | |
"console log": { | |
"prefix": "cl", | |
"body": [ | |
"console.log($1)" | |
], | |
"description": "" | |
}, | |
"lambda": { | |
"prefix": "lb", | |
"body": [ | |
"(${1:args}) => {${2:body}}" | |
], | |
"description": "" | |
}, | |
"function": { | |
"prefix": "fn", | |
"body": [ | |
"function ${1:name}(${2:args}) {", | |
" ${3:body}", | |
"}" | |
], | |
"description": "" | |
}, | |
"if": { | |
"prefix": "i", | |
"body": [ | |
"if (${1:condition}) {", | |
" ${2:body}", | |
"}" | |
], | |
"description": "" | |
}, | |
"reduce": { | |
"prefix": "red", | |
"body": [ | |
"${1:arr}.reduce((${2:acc}, ${3:item}) => {", | |
" ${5:body}", | |
" return ${2:acc}", | |
"}, ${4:initial})" | |
], | |
"description": "" | |
}, | |
"lodash reduce": { | |
"prefix": "_red", | |
"body": [ | |
"_.reduce(${1:arr}, (${2:acc}, ${3:item}) => {", | |
" ${5:body}", | |
" return ${2:acc}", | |
"}, ${4:initial})" | |
], | |
"description": "" | |
}, | |
"map": { | |
"prefix": "map", | |
"body": [ | |
"${1:arr}.map((${2:item}) => {", | |
" return ${2:item}", | |
"})" | |
], | |
"description": "" | |
}, | |
"lodash map": { | |
"prefix": "_map", | |
"body": [ | |
"_.map(${1:arr}, ${2:item} => {", | |
" return ${2:item}", | |
"})" | |
], | |
"description": "" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment