Merge pull request #180 from mwcz/master

Added a semicolon to the sdf (self-defining function) javascript snippet
This commit is contained in:
Honza Pokorny 2013-03-17 17:03:49 -07:00
commit 8e84c61631

View File

@ -129,7 +129,7 @@ snippet sdf
$1 = function ($2) { $1 = function ($2) {
${4:// main code} ${4:// main code}
}; };
} };
# singleton # singleton
snippet sing snippet sing
function ${1:Singleton} (${2:argument}) { function ${1:Singleton} (${2:argument}) {
@ -154,3 +154,10 @@ snippet sing
return instance; return instance;
} }
# Crockford's object function
snippet obj
function object(o) {
function F() {}
F.prototype = o;
return new F();
}