add a snippet for Crockford's object() function

This commit is contained in:
mwcz 2013-03-14 15:13:36 -03:00
parent 4ce177eadd
commit c85575e50d

View File

@ -154,3 +154,10 @@ snippet sing
return instance;
}
# Crockford's object function
snippet obj
object(o) {
function F() {}
F.prototype = o;
return new F();
}