-
Notifications
You must be signed in to change notification settings - Fork 1
/
self.min.js
2 lines (2 loc) · 1.84 KB
/
self.min.js
1
2
/* Self v1.0.0 https://github.com/munro/self | https://github.com/munro/self/blob/master/LICENSE */
var Self=function(){"use strict";function n(){return n.extend.apply(n,arguments)}function r(e){return function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(this),e.apply(this,t)}}function i(t){return function(n){return e(t,n)}}function s(e){return function(t){var n;for(n in t)t.hasOwnProperty(n)&&n!=="prototype"&&n!=="__super__"&&n!=="extend"&&n!=="mixin"&&n!=="staticProps"&&(e[n]=t[n]);for(n in t.prototype)typeof e.prototype[n]=="undefined"&&!Object.hasOwnProperty(n)&&(e.prototype[n]=t.prototype[n]);return e}}function o(e){return function(t){var n;t=t||{};for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}}var e,t;return n.VERSION="1.0.0",typeof Object.create=="function"?t=Object.create:t=function(e){function t(){}return t.prototype=e,new t},e=function(e,u){function f(){var n;return this&&this.__class__?(f.prototype.constructor.apply(this,arguments),this):(this instanceof f?n=this:n=t(f.prototype),n.__class__=f,n.__super__=e.prototype,typeof n.constructor=="function"&&n.constructor.apply(n,arguments),n)}var a;for(a in e)e.hasOwnProperty(a)&&e[a]!==n[a]&&(f[a]=e[a]);f.prototype=t(e.prototype),f.__super__=e.prototype,f.extend=i(f),f.mixin=s(f),f.staticProps=o(f);for(a in u)Object.hasOwnProperty(a)||(typeof u[a]=="function"?f.prototype[a]=r(u[a]):f.prototype[a]=u[a]);return f},n.__super__=Object.prototype,n.extend=function(t,r){return typeof r=="undefined"?e(n,t):e(n.create(t),r)},n.mixin=s(n),n.create=function(e){function r(){var n;return this instanceof r||this&&this.__class__?n=this:n=t(r.prototype),e.apply(n,arguments),n}var n;for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return r.__super__=Object.prototype,r.extend=i(r),r.mixin=s(r),r.staticProps=o(r),r.prototype=t(e.prototype),r},n}();typeof module!="undefined"&&(module.exports=Self);