7 lines
14 KiB
JavaScript
7 lines
14 KiB
JavaScript
|
/*!
|
||
|
* https://github.com/es-shims/es5-shim
|
||
|
* @license es5-shim Copyright 2009-2014 by contributors, MIT License
|
||
|
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
|
||
|
*/
|
||
|
(function(t,r){if(typeof define==="function"&&define.amd){define(r)}else if(typeof exports==="object"){module.exports=r()}else{t.returnExports=r()}})(this,function(){var t=Function.prototype.call;var r=Array.prototype;var e=Object.prototype;var n=r.slice;var i=Array.prototype.splice;var o=Array.prototype.push;var a=Array.prototype.unshift;var l=function(t){return e.toString.call(t)==="[object Function]"};var u=function(t){return e.toString.call(t)==="[object RegExp]"};function p(){}if(!Function.prototype.bind){Function.prototype.bind=function H(t){var r=this;if(!l(r)){throw new TypeError("Function.prototype.bind called on incompatible "+r)}var e=n.call(arguments,1);var i=function(){if(this instanceof s){var i=r.apply(this,e.concat(n.call(arguments)));if(Object(i)===i){return i}return this}else{return r.apply(t,e.concat(n.call(arguments)))}};var o=Math.max(0,r.length-e.length);var a=[];for(var u=0;u<o;u++){a.push("$"+u)}var s=Function("binder","return function("+a.join(",")+"){return binder.apply(this,arguments)}")(i);if(r.prototype){p.prototype=r.prototype;s.prototype=new p;p.prototype=null}return s}}var s=t.bind(e.hasOwnProperty);var f=t.bind(e.toString);var c;var h;var y;var g;var v;if(v=s(e,"__defineGetter__")){c=t.bind(e.__defineGetter__);h=t.bind(e.__defineSetter__);y=t.bind(e.__lookupGetter__);g=t.bind(e.__lookupSetter__)}if([1,2].splice(0).length!==2){if(function(){function t(t){var r=[];while(t--){r.unshift(t)}return r}var r=[];var e;r.splice.bind(r,0,0).apply(null,t(20));r.splice.bind(r,0,0).apply(null,t(26));e=r.length;r.splice(5,0,"XXX");if(e+1===r.length){return true}}()){Array.prototype.splice=function(t,r){if(!arguments.length){return[]}else{return i.apply(this,[t===void 0?0:t,r===void 0?this.length-t:r].concat(n.call(arguments,2)))}}}else{Array.prototype.splice=function(t,r){var e;var l=n.call(arguments,2);var u=l.length;if(!arguments.length){return[]}if(t===void 0){t=0}if(r===void 0){r=this.length-t}if(u>0){if(r<=0){if(t===this.length){o.apply(this,l);return[]}if(t===0){a.apply(this,l);return[]}}e=n.call(this,t,t+r);l.push.apply(l,n.call(this,t+r,this.length));l.unshift.apply(l,n.call(this,0,t));l.unshift(0,this.length);i.apply(this,l);return e}return i.call(this,t,r)}}}if([].unshift(0)!==1){Array.prototype.unshift=function(){a.apply(this,arguments);return this.length}}if(!Array.isArray){Array.isArray=function L(t){return f(t)==="[object Array]"}}var d=Object("a");var b=d[0]!=="a"||!(0 in d);var m=function Y(t){var r=true;if(t){t.call("foo",function(t,e,n){if(typeof n!=="object"){r=false}})}return!!t&&r};if(!Array.prototype.forEach||!m(Array.prototype.forEach)){Array.prototype.forEach=function q(t){var r=B(this),e=b&&f(this)==="[object String]"?this.split(""):r,n=arguments[1],i=-1,o=e.length>>>0;if(!l(t)){throw new TypeError}while(++i<o){if(i in e){t.call(n,e[i],i,r)}}}}if(!Array.prototype.map||!m(Array.prototype.map)){Array.prototype.map=function z(t){var r=B(this),e=b&&f(this)==="[object String]"?this.split(""):r,n=e.length>>>0,i=Array(n),o=arguments[1];if(!l(t)){throw new TypeError(t+" is not a function")}for(var a=0;a<n;a++){if(a in e)i[a]=t.call(o,e[a],a,r)}return i}}if(!Array.prototype.filter||!m(Array.prototype.filter)){Array.prototype.filter=function K(t){var r=B(this),e=b&&f(this)==="[object String]"?this.split(""):r,n=e.length>>>0,i=[],o,a=arguments[1];if(!l(t)){throw new TypeError(t+" is not a function")}for(var u=0;u<n;u++){if(u in e){o=e[u];if(t.call(a,o,u,r)){i.push(o)}}}return i}}if(!Array.prototype.every||!m(Array.prototype.every)){Array.prototype.every=function Q(t){var r=B(this),e=b&&f(this)==="[object String]"?this.split(""):r,n=e.length>>>0,i=arguments[1];if(!l(t)){throw new TypeError(t+" is not a function")}for(var o=0;o<n;o++){if(o in e&&!t.call(i,e[o],o,r)){return false}}return true}}if(!Array.prototype.some||!m(Array.prototype.some)){Array.prototype.some=function V(t){var r=B(this),e=b&&f(this)==="[object String]"?this.split(""):r,n=e.length>>>0,i=arguments[1];if(!l(t)){throw new TypeError(t+" is not a function")}for(var o=0;o<n;o++){if(o in e&&t.call(i,e[o],o,r)){return true}}ret
|
||
|
//# sourceMappingURL=es5-shim.map
|