Skip to content

Instantly share code, notes, and snippets.

@charud
charud / module-js-init.sublime-snippet
Created March 7, 2012 08:01
Init method for Lightweight Javascript Module
<snippet>
<content><![CDATA[
me.init = function()
{
${1}
};
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>init</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@charud
charud / module-js.sublime-snippet
Created March 7, 2012 08:00
Lightweight Javascript Module
<snippet>
<content><![CDATA[
var ${1} = ${1} || {};
${1}.${2} = (function(me)
{
${3}
return me;
})(${1}.${2} || {});