You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.1 KiB
Plaintext
66 lines
1.1 KiB
Plaintext
11 years ago
|
snippet f "function" !
|
||
4 years ago
|
function ${1:func} (${2}) {
|
||
|
${VISUAL}$0
|
||
|
}
|
||
|
endsnippet
|
||
|
|
||
|
snippet if "if" !
|
||
|
if (${1:true}) {
|
||
11 years ago
|
${VISUAL}$0
|
||
|
}
|
||
|
endsnippet
|
||
|
|
||
11 years ago
|
snippet scf "self calling function" !
|
||
11 years ago
|
(function (${1:argument}) {
|
||
|
${VISUAL}$0
|
||
6 years ago
|
}(${2:$1}));
|
||
11 years ago
|
endsnippet
|
||
|
|
||
|
snippet log "console.log"
|
||
4 years ago
|
console.log(${1:'${2:value}'});
|
||
11 years ago
|
endsnippet
|
||
10 years ago
|
|
||
11 years ago
|
snippet strict "use strict"
|
||
4 years ago
|
'use strict';
|
||
11 years ago
|
endsnippet
|
||
10 years ago
|
|
||
11 years ago
|
snippet timeout "setTimeout" !
|
||
|
setTimeout(function () {
|
||
|
${1://code}
|
||
4 years ago
|
}, 0);
|
||
11 years ago
|
endsnippet
|
||
10 years ago
|
|
||
10 years ago
|
snippet it "it test case" !
|
||
7 years ago
|
it('→ $1', () => {
|
||
4 years ago
|
});
|
||
10 years ago
|
endsnippet
|
||
|
|
||
10 years ago
|
snippet desc "describe test case" !
|
||
7 years ago
|
describe('→ $1', () => {
|
||
4 years ago
|
});
|
||
10 years ago
|
endsnippet
|
||
|
|
||
10 years ago
|
snippet exp "expect" b
|
||
4 years ago
|
expect($1).toBe($2);
|
||
10 years ago
|
endsnippet
|
||
|
|
||
|
snippet umd "Universal Module Definition" b
|
||
|
(function (root, factory) {
|
||
|
if (typeof define === "function" && define.amd) {
|
||
4 years ago
|
define(["${1:dependency}"], factory);
|
||
10 years ago
|
} else if (typeof exports === "object") {
|
||
4 years ago
|
module.exports = factory(require("$1"));
|
||
10 years ago
|
} else {
|
||
4 years ago
|
root.${2:Export} = factory(root.$1);
|
||
10 years ago
|
}
|
||
|
}(this, function ($1) {
|
||
|
function $2($3) {
|
||
|
}
|
||
4 years ago
|
return $2;
|
||
7 years ago
|
}))
|
||
10 years ago
|
endsnippet
|
||
8 years ago
|
|
||
|
snippet debug "debugger" !
|
||
4 years ago
|
debugger$1;
|
||
8 years ago
|
endsnippet
|