Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Class = (function() {
- function init() {
- return function() {
- if (this.initialize) {
- this.initialize.apply(this, arguments);
- }
- };
- }
- function extend(protoProps, staticProps) {
- var parent = this;
- var child = init();
- window.$.extend(child, parent, staticProps);
- var proto = Object.create(parent.prototype);
- proto.constructor = child;
- child.prototype = proto;
- window.$.extend(child.prototype, protoProps);
- child.superClass = parent.prototype;
- return child;
- }
- var Class = function(protoProps) {
- var cls = init();
- window.$.extend(cls.prototype, protoProps);
- cls.extend = extend;
- return cls;
- };
- Class.extend = extend;
- return Class;
- })();
- export default Class
- // WEBPACK FOOTER //
- // ./src/utility/class.js
Add Comment
Please, Sign In to add comment