File tree Expand file tree Collapse file tree 3 files changed +22
-10
lines changed Expand file tree Collapse file tree 3 files changed +22
-10
lines changed Original file line number Diff line number Diff line change @@ -380,7 +380,7 @@ Object.assign(${1:dest}, ${2:source})
380380return ${0 }
381381```
382382
383- #### ` rth ⇥` return this
383+ #### ` rt ⇥` return this
384384``` js
385385return this
386386```
@@ -390,14 +390,18 @@ return this
390390return null
391391```
392392
393- #### ` rt ⇥` return true
393+ #### ` ro ⇥` return new object
394394``` js
395- return true
395+ return {
396+ ${0 }
397+ }
396398```
397399
398- #### ` rf ⇥` return false
400+ #### ` ro ⇥` return new array
399401``` js
400- return false
402+ return [
403+ ${0 }
404+ ]
401405```
402406
403407#### ` rp⇥ ` return Promise (ES6)
Original file line number Diff line number Diff line change 33 "displayName" : " JavaScript standardjs styled snippets" ,
44 "publisher" : " capaj" ,
55 "icon" : " images/javascript.png" ,
6- "version" : " 0.2 .0" ,
6+ "version" : " 0.3 .0" ,
77 "description" : " standardjs styled javascript snippets for visual studio code" ,
88 "repository" : {
99 "type" : " git" ,
Original file line number Diff line number Diff line change 299299 "body" : " export default ${1:member}"
300300 },
301301 "import module" : {
302- "prefix" : " i " ,
302+ "prefix" : " im " ,
303303 "body" : " import ${1:*} from '${2:module}'"
304304 },
305305 "import module as" : {
327327 "body" : " let ${0} \n if (${2:condition}) {\n\t ${1}\n }"
328328 },
329329 "if statement" : {
330- "prefix" : " if " ,
330+ "prefix" : " i " ,
331331 "body" : " if (${1:condition}) {\n\t ${0}\n }"
332332 },
333333 "else statement" : {
361361 "throw new Error" : {
362362 "prefix" : " tn" ,
363363 "body" : " throw new ${0:error}"
364- }
364+ },
365365 "try/catch" : {
366366 "prefix" : " tc" ,
367367 "body" : " try {\n\t ${0}\n } catch (${1:err}) {\n\t\n }"
487487 "body" : " yield ${0}"
488488 },
489489 "return this" : {
490- "prefix" : " rth " ,
490+ "prefix" : " rt " ,
491491 "body" : " return this"
492492 },
493493 "return null" : {
494494 "prefix" : " rn" ,
495495 "body" : " return null"
496496 },
497+ "return new object" : {
498+ "prefix" : " ro" ,
499+ "body" : " return {\n\t ${0}\n }"
500+ },
501+ "return new array" : {
502+ "prefix" : " ra" ,
503+ "body" : " return [\n\t ${0}\n ]"
504+ },
497505 "return promise" : {
498506 "prefix" : " rp" ,
499507 "body" : " return new Promise((resolve, reject) => {\n\t ${0}\n })"
You can’t perform that action at this time.
0 commit comments