73 lines
1.1 KiB
Plaintext
73 lines
1.1 KiB
Plaintext
|
snippet req
|
||
|
${1:object} = require('$1')
|
||
|
|
||
|
snippet log
|
||
|
console.log ${0}
|
||
|
|
||
|
snippet unl
|
||
|
${1:action} unless ${2:condition}
|
||
|
|
||
|
snippet try
|
||
|
try
|
||
|
${1}
|
||
|
catch ${2:error}
|
||
|
${3}
|
||
|
|
||
|
snippet if
|
||
|
if ${1:condition}
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet elif
|
||
|
else if ${1:condition}
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet ifte
|
||
|
if ${1:condition} then ${2:value} else ${3:other}
|
||
|
|
||
|
snippet ife
|
||
|
if ${1:condition}
|
||
|
${2:# body...}
|
||
|
else
|
||
|
${3:# body...}
|
||
|
|
||
|
snippet swi
|
||
|
switch ${1:object}
|
||
|
when ${2:value}
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet ^j
|
||
|
\`${1:javascript}\`
|
||
|
|
||
|
snippet forr
|
||
|
for ${1:name} in [${2:start}..${3:finish}]${4: by ${5:step\}}
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet forrex
|
||
|
for ${1:name} in [${2:start}...${3:finish}]${4: by ${t:step\}}
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet foro
|
||
|
for ${1:key}, ${2:value} of ${3:object}
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet fora
|
||
|
for ${1:name} in ${2:array}
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet fun
|
||
|
${1:name} = (${2:args}) ->
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet bfun
|
||
|
(${1:args}) =>
|
||
|
${0:# body...}
|
||
|
|
||
|
snippet cla
|
||
|
abbr cla
|
||
|
prev_word '^'
|
||
|
class ${1:ClassName}${2: extends ${3:Ancestor\}}
|
||
|
|
||
|
constructor: (${4:args}) ->
|
||
|
${5:# body...}
|
||
|
|