JavaScript Module Extend snippet
<snippet>
<content><![CDATA[
var ${1:Module} = (function (module) {
"use strict";
var module = {};
var ${2:selector} = '';
// Init
module.init = function () {
module.initSelector();
};
// Init Selector
module.initSelector = function () {
${2:selector} = ${3:selector};
};
return module;
})(${1:Module});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>modx</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>