Merge pull request #180 from mwcz/master
Added a semicolon to the sdf (self-defining function) javascript snippet
This commit is contained in:
commit
8e84c61631
@ -129,7 +129,7 @@ snippet sdf
|
||||
$1 = function ($2) {
|
||||
${4:// main code}
|
||||
};
|
||||
}
|
||||
};
|
||||
# singleton
|
||||
snippet sing
|
||||
function ${1:Singleton} (${2:argument}) {
|
||||
@ -154,3 +154,10 @@ snippet sing
|
||||
|
||||
return instance;
|
||||
}
|
||||
# Crockford's object function
|
||||
snippet obj
|
||||
function object(o) {
|
||||
function F() {}
|
||||
F.prototype = o;
|
||||
return new F();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user