Skip to content

Instantly share code, notes, and snippets.

@fredkingham
Created December 20, 2012 15:35
Show Gist options
  • Save fredkingham/4345989 to your computer and use it in GitHub Desktop.
Save fredkingham/4345989 to your computer and use it in GitHub Desktop.
JAVASCRIPT - newClass
<snippet>
<content><![CDATA[
!function(modelPageView){
"use strict"
var ${1:obj_name} = function(){
this.init()
}
${obj_name}.prototype = {
constructor: ${1:obj_name}
, init: function(){
}
}
modelPageView.${1:obj_name} = ${1:obj_name}
})(modelPageView)
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>newModal</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment