-
Notifications
You must be signed in to change notification settings - Fork 0
/
class.min.js
12 lines (12 loc) · 1.05 KB
/
class.min.js
1
2
3
4
5
6
7
8
9
10
11
12
/*!
* Simple JavaScript Inheritance
* By John Resig http://ejohn.org/
* MIT Licensed.
*/
(function(a){var c=false,e=/xyz/.test(function(){xyz;})?/\b_super\b/:/.*/;
function b(){}function d(){var m=Array.prototype.slice.call(arguments);var l=0;var k=m.length;var h=new this();var n,o;for(;l<k;l++){n=m[l];for(o in n){h[o]=n[o];
}}function g(){}g.prototype=h;g.prototype.constructor=g;g.inject=arguments.callee;g.extend=f;return g;}function f(j){var i=this.prototype;c=true;var h=new this();
c=false;for(var k in j){h[k]=typeof j[k]=="function"&&typeof i[k]=="function"&&e.test(j[k])?(function(m,l){return function(){var o=this._super;this._super=i[m];
var n=l.apply(this,arguments);this._super=o;return n;};})(k,j[k]):j[k];}function g(){if(!c&&this.init){this.init.apply(this,arguments);}}g.prototype=h;
g.prototype.constructor=g;g.extend=arguments.callee;g.inject=d;return g;}b.inject=d;b.extend=f;b.version="1.1.4";if(typeof define!=="undefined"){return define(function(h,g,i){i.exports=b;
});}if(typeof exports==="undefined"){a.Class=b;return;}module.exports=b;})(this);