UNPKG

dunder

Version:

hot-swap inheritance for every engine

2 lines 802 B
/*! (C) WebReflection Mit Style License */ var dunder;dunder||(dunder=function(e){"use strict";var t=e.getPrototypeOf||function(e){return e[a]},n=e.setPrototypeOf,r=e.getOwnPropertyDescriptor,i=e.getOwnPropertyNames,s=e.defineProperty,o=e.create,u=e.prototype,a="__proto__",f="length",l=!1,c=function(){return l||(l=delete u[a])},h,p;if(n)h=function(r,i){return arguments[f]===1?t(r):n(r,i)};else if(a in u)try{p=r(u,a).set,h=function(n,r){return arguments[f]===1?t(n):(p.call(n,r),n)},h({},u)}catch(d){h=function(t,n){return arguments[f]===1?t[a]:(t[a]=n,t)},c=null}else p=function(e,t){var n=i(e),o=n[f],u;if(n.indexOf(f)<0)while(o--)u=n[o],s(t,u,r(e,u));else n.push.call(t,e);return t},h=function(n,r){return arguments[f]===1?t(n):p(n,o(r))},c=null;return h.free=c||function(){return!1},h}(Object));