Merge pull request #108 from smt/js-whitespace
JS whitespace style (minor)
This commit is contained in:
commit
28d23a390b
@ -11,12 +11,12 @@ snippet fun
|
|||||||
}
|
}
|
||||||
# Anonymous Function
|
# Anonymous Function
|
||||||
snippet f
|
snippet f
|
||||||
function(${1}) {
|
function (${1}) {
|
||||||
${3}
|
${3}
|
||||||
}${2:;}
|
}${2:;}
|
||||||
# Immediate function
|
# Immediate function
|
||||||
snippet (f
|
snippet (f
|
||||||
(function(${1}) {
|
(function (${1}) {
|
||||||
${3:/* code */}
|
${3:/* code */}
|
||||||
}(${2}));
|
}(${2}));
|
||||||
# if
|
# if
|
||||||
@ -69,7 +69,7 @@ snippet wh
|
|||||||
snippet try
|
snippet try
|
||||||
try {
|
try {
|
||||||
${1:/* code */}
|
${1:/* code */}
|
||||||
} catch(${2:e}) {
|
} catch (${2:e}) {
|
||||||
${3:/* handle error */}
|
${3:/* handle error */}
|
||||||
}
|
}
|
||||||
# do...while
|
# do...while
|
||||||
@ -79,12 +79,12 @@ snippet do
|
|||||||
} while (${1:/* condition */});
|
} while (${1:/* condition */});
|
||||||
# Object Method
|
# Object Method
|
||||||
snippet :f
|
snippet :f
|
||||||
${1:method_name}: function(${2:attribute}) {
|
${1:method_name}: function (${2:attribute}) {
|
||||||
${4}
|
${4}
|
||||||
}${3:,}
|
}${3:,}
|
||||||
# setTimeout function
|
# setTimeout function
|
||||||
snippet timeout
|
snippet timeout
|
||||||
setTimeout(function() {${3}}${2}, ${1:10});
|
setTimeout(function () {${3}}${2}, ${1:10});
|
||||||
# Get Elements
|
# Get Elements
|
||||||
snippet get
|
snippet get
|
||||||
getElementsBy${1:TagName}('${2}')${3}
|
getElementsBy${1:TagName}('${2}')${3}
|
||||||
|
Loading…
Reference in New Issue
Block a user