Comparing version 4.3.1 to 4.4.0
@@ -138,4 +138,16 @@ { | ||
"afterStar": true | ||
} | ||
}, | ||
"disallowSpacesInGenerator": { | ||
"beforeStar": true | ||
}, | ||
"disallowVar": false, | ||
"requireArrayDestructuring": false, | ||
"requireEnhancedObjectLiterals": false, | ||
"requireObjectDestructuring": false | ||
} | ||
@@ -5,3 +5,3 @@ { | ||
"description": "ECMAScript 5 compatibility shims for legacy JavaScript engines", | ||
"version": "v4.3.1", | ||
"version": "v4.4.0", | ||
"keywords": [ | ||
@@ -8,0 +8,0 @@ "shim", |
@@ -13,3 +13,3 @@ /*! | ||
// UMD (Universal Module Definition) | ||
// see https://github.com/umdjs/umd/blob/master/returnExports.js | ||
// see https://github.com/umdjs/umd/blob/master/templates/returnExports.js | ||
(function (root, factory) { | ||
@@ -33,6 +33,6 @@ 'use strict'; | ||
var call = Function.prototype.call; | ||
var call = Function.call; | ||
var prototypeOfObject = Object.prototype; | ||
var owns = call.bind(prototypeOfObject.hasOwnProperty); | ||
var propertyIsEnumerable = call.bind(prototypeOfObject.propertyIsEnumerable); | ||
var isEnumerable = call.bind(prototypeOfObject.propertyIsEnumerable); | ||
var toStr = call.bind(prototypeOfObject.toString); | ||
@@ -136,3 +136,3 @@ | ||
descriptor = { | ||
enumerable: propertyIsEnumerable(object, property), | ||
enumerable: isEnumerable(object, property), | ||
configurable: true | ||
@@ -139,0 +139,0 @@ }; |
/*! | ||
* https://github.com/es-shims/es5-shim | ||
* @license es5-shim Copyright 2009-2015 by contributors, MIT License | ||
* see https://github.com/es-shims/es5-shim/blob/v4.3.1/LICENSE | ||
* see https://github.com/es-shims/es5-shim/blob/v4.4.0/LICENSE | ||
*/ | ||
(function(e,t){"use strict";if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){var e=Function.prototype.call;var t=Object.prototype;var r=e.bind(t.hasOwnProperty);var n=e.bind(t.propertyIsEnumerable);var o=e.bind(t.toString);var i;var c;var f;var a;var l=r(t,"__defineGetter__");if(l){i=e.bind(t.__defineGetter__);c=e.bind(t.__defineSetter__);f=e.bind(t.__lookupGetter__);a=e.bind(t.__lookupSetter__)}if(!Object.getPrototypeOf){Object.getPrototypeOf=function getPrototypeOf(e){var r=e.__proto__;if(r||r===null){return r}else if(o(e.constructor)==="[object Function]"){return e.constructor.prototype}else if(e instanceof Object){return t}else{return null}}}var u=function doesGetOwnPropertyDescriptorWork(e){try{e.sentinel=0;return Object.getOwnPropertyDescriptor(e,"sentinel").value===0}catch(t){return false}};if(Object.defineProperty){var p=u({});var s=typeof document==="undefined"||u(document.createElement("div"));if(!s||!p){var b=Object.getOwnPropertyDescriptor}}if(!Object.getOwnPropertyDescriptor||b){var O="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function getOwnPropertyDescriptor(e,o){if(typeof e!=="object"&&typeof e!=="function"||e===null){throw new TypeError(O+e)}if(b){try{return b.call(Object,e,o)}catch(i){}}var c;if(!r(e,o)){return c}c={enumerable:n(e,o),configurable:true};if(l){var u=e.__proto__;var p=e!==t;if(p){e.__proto__=t}var s=f(e,o);var y=a(e,o);if(p){e.__proto__=u}if(s||y){if(s){c.get=s}if(y){c.set=y}return c}}c.value=e[o];c.writable=true;return c}}if(!Object.getOwnPropertyNames){Object.getOwnPropertyNames=function getOwnPropertyNames(e){return Object.keys(e)}}if(!Object.create){var y;var d=!({__proto__:null}instanceof Object);var j=function shouldUseActiveX(){if(!document.domain){return false}try{return!!new ActiveXObject("htmlfile")}catch(e){return false}};var v=function getEmptyViaActiveX(){var e;var t;t=new ActiveXObject("htmlfile");t.write("<script></script>");t.close();e=t.parentWindow.Object.prototype;t=null;return e};var _=function getEmptyViaIFrame(){var e=document.createElement("iframe");var t=document.body||document.documentElement;var r;e.style.display="none";t.appendChild(e);e.src="javascript:";r=e.contentWindow.Object.prototype;t.removeChild(e);e=null;return r};if(d||typeof document==="undefined"){y=function(){return{__proto__:null}}}else{y=function(){var e=j()?v():_();delete e.constructor;delete e.hasOwnProperty;delete e.propertyIsEnumerable;delete e.isPrototypeOf;delete e.toLocaleString;delete e.toString;delete e.valueOf;var t=function Empty(){};t.prototype=e;y=function(){return new t};return new t}}Object.create=function create(e,t){var r;var n=function Type(){};if(e===null){r=y()}else{if(typeof e!=="object"&&typeof e!=="function"){throw new TypeError("Object prototype may only be an Object or null")}n.prototype=e;r=new n;r.__proto__=e}if(t!==void 0){Object.defineProperties(r,t)}return r}}var w=function doesDefinePropertyWork(e){try{Object.defineProperty(e,"sentinel",{});return"sentinel"in e}catch(t){return false}};if(Object.defineProperty){var m=w({});var P=typeof document==="undefined"||w(document.createElement("div"));if(!m||!P){var E=Object.defineProperty,h=Object.defineProperties}}if(!Object.defineProperty||E){var g="Property description must be an object: ";var z="Object.defineProperty called on non-object: ";var T="getters & setters can not be defined on this javascript engine";Object.defineProperty=function defineProperty(e,r,n){if(typeof e!=="object"&&typeof e!=="function"||e===null){throw new TypeError(z+e)}if(typeof n!=="object"&&typeof n!=="function"||n===null){throw new TypeError(g+n)}if(E){try{return E.call(Object,e,r,n)}catch(o){}}if("value"in n){if(l&&(f(e,r)||a(e,r))){var u=e.__proto__;e.__proto__=t;delete e[r];e[r]=n.value;e.__proto__=u}else{e[r]=n.value}}else{if(!l&&("get"in n||"set"in n)){throw new TypeError(T)}if("get"in n){i(e,r,n.get)}if("set"in n){c(e,r,n.set)}}return e}}if(!Object.defineProperties||h){Object.defineProperties=function defineProperties(e,t){if(h){try{return h.call(Object,e,t)}catch(r){}}Object.keys(t).forEach(function(r){if(r!=="__proto__"){Object.defineProperty(e,r,t[r])}});return e}}if(!Object.seal){Object.seal=function seal(e){if(Object(e)!==e){throw new TypeError("Object.seal can only be called on Objects.")}return e}}if(!Object.freeze){Object.freeze=function freeze(e){if(Object(e)!==e){throw new TypeError("Object.freeze can only be called on Objects.")}return e}}try{Object.freeze(function(){})}catch(x){Object.freeze=function(e){return function freeze(t){if(typeof t==="function"){return t}else{return e(t)}}}(Object.freeze)}if(!Object.preventExtensions){Object.preventExtensions=function preventExtensions(e){if(Object(e)!==e){throw new TypeError("Object.preventExtensions can only be called on Objects.")}return e}}if(!Object.isSealed){Object.isSealed=function isSealed(e){if(Object(e)!==e){throw new TypeError("Object.isSealed can only be called on Objects.")}return false}}if(!Object.isFrozen){Object.isFrozen=function isFrozen(e){if(Object(e)!==e){throw new TypeError("Object.isFrozen can only be called on Objects.")}return false}}if(!Object.isExtensible){Object.isExtensible=function isExtensible(e){if(Object(e)!==e){throw new TypeError("Object.isExtensible can only be called on Objects.")}var t="";while(r(e,t)){t+="?"}e[t]=true;var n=r(e,t);delete e[t];return n}}}); | ||
(function(e,t){"use strict";if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){var e=Function.call;var t=Object.prototype;var r=e.bind(t.hasOwnProperty);var n=e.bind(t.propertyIsEnumerable);var o=e.bind(t.toString);var i;var c;var f;var a;var l=r(t,"__defineGetter__");if(l){i=e.bind(t.__defineGetter__);c=e.bind(t.__defineSetter__);f=e.bind(t.__lookupGetter__);a=e.bind(t.__lookupSetter__)}if(!Object.getPrototypeOf){Object.getPrototypeOf=function getPrototypeOf(e){var r=e.__proto__;if(r||r===null){return r}else if(o(e.constructor)==="[object Function]"){return e.constructor.prototype}else if(e instanceof Object){return t}else{return null}}}var u=function doesGetOwnPropertyDescriptorWork(e){try{e.sentinel=0;return Object.getOwnPropertyDescriptor(e,"sentinel").value===0}catch(t){return false}};if(Object.defineProperty){var p=u({});var s=typeof document==="undefined"||u(document.createElement("div"));if(!s||!p){var b=Object.getOwnPropertyDescriptor}}if(!Object.getOwnPropertyDescriptor||b){var O="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function getOwnPropertyDescriptor(e,o){if(typeof e!=="object"&&typeof e!=="function"||e===null){throw new TypeError(O+e)}if(b){try{return b.call(Object,e,o)}catch(i){}}var c;if(!r(e,o)){return c}c={enumerable:n(e,o),configurable:true};if(l){var u=e.__proto__;var p=e!==t;if(p){e.__proto__=t}var s=f(e,o);var y=a(e,o);if(p){e.__proto__=u}if(s||y){if(s){c.get=s}if(y){c.set=y}return c}}c.value=e[o];c.writable=true;return c}}if(!Object.getOwnPropertyNames){Object.getOwnPropertyNames=function getOwnPropertyNames(e){return Object.keys(e)}}if(!Object.create){var y;var d=!({__proto__:null}instanceof Object);var j=function shouldUseActiveX(){if(!document.domain){return false}try{return!!new ActiveXObject("htmlfile")}catch(e){return false}};var v=function getEmptyViaActiveX(){var e;var t;t=new ActiveXObject("htmlfile");t.write("<script></script>");t.close();e=t.parentWindow.Object.prototype;t=null;return e};var _=function getEmptyViaIFrame(){var e=document.createElement("iframe");var t=document.body||document.documentElement;var r;e.style.display="none";t.appendChild(e);e.src="javascript:";r=e.contentWindow.Object.prototype;t.removeChild(e);e=null;return r};if(d||typeof document==="undefined"){y=function(){return{__proto__:null}}}else{y=function(){var e=j()?v():_();delete e.constructor;delete e.hasOwnProperty;delete e.propertyIsEnumerable;delete e.isPrototypeOf;delete e.toLocaleString;delete e.toString;delete e.valueOf;var t=function Empty(){};t.prototype=e;y=function(){return new t};return new t}}Object.create=function create(e,t){var r;var n=function Type(){};if(e===null){r=y()}else{if(typeof e!=="object"&&typeof e!=="function"){throw new TypeError("Object prototype may only be an Object or null")}n.prototype=e;r=new n;r.__proto__=e}if(t!==void 0){Object.defineProperties(r,t)}return r}}var w=function doesDefinePropertyWork(e){try{Object.defineProperty(e,"sentinel",{});return"sentinel"in e}catch(t){return false}};if(Object.defineProperty){var m=w({});var P=typeof document==="undefined"||w(document.createElement("div"));if(!m||!P){var E=Object.defineProperty,h=Object.defineProperties}}if(!Object.defineProperty||E){var g="Property description must be an object: ";var z="Object.defineProperty called on non-object: ";var T="getters & setters can not be defined on this javascript engine";Object.defineProperty=function defineProperty(e,r,n){if(typeof e!=="object"&&typeof e!=="function"||e===null){throw new TypeError(z+e)}if(typeof n!=="object"&&typeof n!=="function"||n===null){throw new TypeError(g+n)}if(E){try{return E.call(Object,e,r,n)}catch(o){}}if("value"in n){if(l&&(f(e,r)||a(e,r))){var u=e.__proto__;e.__proto__=t;delete e[r];e[r]=n.value;e.__proto__=u}else{e[r]=n.value}}else{if(!l&&("get"in n||"set"in n)){throw new TypeError(T)}if("get"in n){i(e,r,n.get)}if("set"in n){c(e,r,n.set)}}return e}}if(!Object.defineProperties||h){Object.defineProperties=function defineProperties(e,t){if(h){try{return h.call(Object,e,t)}catch(r){}}Object.keys(t).forEach(function(r){if(r!=="__proto__"){Object.defineProperty(e,r,t[r])}});return e}}if(!Object.seal){Object.seal=function seal(e){if(Object(e)!==e){throw new TypeError("Object.seal can only be called on Objects.")}return e}}if(!Object.freeze){Object.freeze=function freeze(e){if(Object(e)!==e){throw new TypeError("Object.freeze can only be called on Objects.")}return e}}try{Object.freeze(function(){})}catch(x){Object.freeze=function(e){return function freeze(t){if(typeof t==="function"){return t}else{return e(t)}}}(Object.freeze)}if(!Object.preventExtensions){Object.preventExtensions=function preventExtensions(e){if(Object(e)!==e){throw new TypeError("Object.preventExtensions can only be called on Objects.")}return e}}if(!Object.isSealed){Object.isSealed=function isSealed(e){if(Object(e)!==e){throw new TypeError("Object.isSealed can only be called on Objects.")}return false}}if(!Object.isFrozen){Object.isFrozen=function isFrozen(e){if(Object(e)!==e){throw new TypeError("Object.isFrozen can only be called on Objects.")}return false}}if(!Object.isExtensible){Object.isExtensible=function isExtensible(e){if(Object(e)!==e){throw new TypeError("Object.isExtensible can only be called on Objects.")}var t="";while(r(e,t)){t+="?"}e[t]=true;var n=r(e,t);delete e[t];return n}}}); | ||
//# sourceMappingURL=es5-sham.map |
/*! | ||
* https://github.com/es-shims/es5-shim | ||
* @license es5-shim Copyright 2009-2015 by contributors, MIT License | ||
* see https://github.com/es-shims/es5-shim/blob/v4.3.1/LICENSE | ||
* see https://github.com/es-shims/es5-shim/blob/v4.4.0/LICENSE | ||
*/ | ||
(function(e,t){"use strict";if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){var e=Array;var t=e.prototype;var r=Object;var n=r.prototype;var i=Function.prototype;var a=String;var o=a.prototype;var u=Number;var f=u.prototype;var l=t.slice;var s=t.splice;var c=t.push;var v=t.unshift;var p=t.concat;var h=i.call;var g=Math.max;var y=Math.min;var d=n.toString;var m=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var w;var b=Function.prototype.toString,T=function tryFunctionObject(e){try{b.call(e);return true}catch(t){return false}},x="[object Function]",O="[object GeneratorFunction]";w=function isCallable(e){if(typeof e!=="function"){return false}if(m){return T(e)}var t=d.call(e);return t===x||t===O};var S;var I=RegExp.prototype.exec,j=function tryRegexExec(e){try{I.call(e);return true}catch(t){return false}},E="[object RegExp]";S=function isRegex(e){if(typeof e!=="object"){return false}return m?j(e):d.call(e)===E};var N;var D=String.prototype.valueOf,M=function tryStringObject(e){try{D.call(e);return true}catch(t){return false}},U="[object String]";N=function isString(e){if(typeof e==="string"){return true}if(typeof e!=="object"){return false}return m?M(e):d.call(e)===U};var k=function(e){var t=r.defineProperty&&function(){try{var e={};r.defineProperty(e,"x",{enumerable:false,value:e});for(var t in e){return false}return e.x===e}catch(n){return false}}();var n;if(t){n=function(e,t,n,i){if(!i&&t in e){return}r.defineProperty(e,t,{configurable:true,enumerable:false,writable:true,value:n})}}else{n=function(e,t,r,n){if(!n&&t in e){return}e[t]=r}}return function defineProperties(t,r,i){for(var a in r){if(e.call(r,a)){n(t,a,r[a],i)}}}}(n.hasOwnProperty);var R=function isPrimitive(e){var t=typeof e;return e===null||t!=="object"&&t!=="function"};var F=u.isNaN||function(e){return e!==e};var A={ToInteger:function ToInteger(e){var t=+e;if(F(t)){t=0}else if(t!==0&&t!==1/0&&t!==-(1/0)){t=(t>0||-1)*Math.floor(Math.abs(t))}return t},ToPrimitive:function ToPrimitive(e){var t,r,n;if(R(e)){return e}r=e.valueOf;if(w(r)){t=r.call(e);if(R(t)){return t}}n=e.toString;if(w(n)){t=n.call(e);if(R(t)){return t}}throw new TypeError},ToObject:function(e){if(e==null){throw new TypeError("can't convert "+e+" to object")}return r(e)},ToUint32:function ToUint32(e){return e>>>0}};var P=function Empty(){};k(i,{bind:function bind(e){var t=this;if(!w(t)){throw new TypeError("Function.prototype.bind called on incompatible "+t)}var n=l.call(arguments,1);var i;var a=function(){if(this instanceof i){var a=t.apply(this,p.call(n,l.call(arguments)));if(r(a)===a){return a}return this}else{return t.apply(e,p.call(n,l.call(arguments)))}};var o=g(0,t.length-n.length);var u=[];for(var f=0;f<o;f++){c.call(u,"$"+f)}i=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this, arguments); }")(a);if(t.prototype){P.prototype=t.prototype;i.prototype=new P;P.prototype=null}return i}});var $=h.bind(n.hasOwnProperty);var C=h.bind(n.toString);var Z=h.bind(o.slice);var J=h.bind(o.split);var z=h.bind(o.indexOf);var B=h.bind(c);var G=e.isArray||function isArray(e){return C(e)==="[object Array]"};var H=[].unshift(0)!==1;k(t,{unshift:function(){v.apply(this,arguments);return this.length}},H);k(e,{isArray:G});var L=r("a");var X=L[0]!=="a"||!(0 in L);var Y=function properlyBoxed(e){var t=true;var r=true;if(e){e.call("foo",function(e,r,n){if(typeof n!=="object"){t=false}});e.call([1],function(){"use strict";r=typeof this==="string"},"x")}return!!e&&t&&r};k(t,{forEach:function forEach(e){var t=A.ToObject(this);var r=X&&N(this)?J(this,""):t;var n=-1;var i=A.ToUint32(r.length);var a;if(arguments.length>1){a=arguments[1]}if(!w(e)){throw new TypeError("Array.prototype.forEach callback must be a function")}while(++n<i){if(n in r){if(typeof a==="undefined"){e(r[n],n,t)}else{e.call(a,r[n],n,t)}}}}},!Y(t.forEach));k(t,{map:function map(t){var r=A.ToObject(this);var n=X&&N(this)?J(this,""):r;var i=A.ToUint32(n.length);var a=e(i);var o;if(arguments.length>1){o=arguments[1]}if(!w(t)){throw new TypeError("Array.prototype.map callback must be a function")}for(var u=0;u<i;u++){if(u in n){if(typeof o==="undefined"){a[u]=t(n[u],u,r)}else{a[u]=t.call(o,n[u],u,r)}}}return a}},!Y(t.map));k(t,{filter:function filter(e){var t=A.ToObject(this);var r=X&&N(this)?J(this,""):t;var n=A.ToUint32(r.length);var i=[];var a;var o;if(arguments.length>1){o=arguments[1]}if(!w(e)){throw new TypeError("Array.prototype.filter callback must be a function")}for(var u=0;u<n;u++){if(u in r){a=r[u];if(typeof o==="undefined"?e(a,u,t):e.call(o,a,u,t)){B(i,a)}}}return i}},!Y(t.filter));k(t,{every:function every(e){var t=A.ToObject(this);var r=X&&N(this)?J(this,""):t;var n=A.ToUint32(r.length);var i;if(arguments.length>1){i=arguments[1]}if(!w(e)){throw new TypeError("Array.prototype.every callback must be a function")}for(var a=0;a<n;a++){if(a in r&&!(typeof i==="undefined"?e(r[a],a,t):e.call(i,r[a],a,t))){return false}}return true}},!Y(t.every));k(t,{some:function some(e){var t=A.ToObject(this);var r=X&&N(this)?J(this,""):t;var n=A.ToUint32(r.length);var i;if(arguments.length>1){i=arguments[1]}if(!w(e)){throw new TypeError("Array.prototype.some callback must be a function")}for(var a=0;a<n;a++){if(a in r&&(typeof i==="undefined"?e(r[a],a,t):e.call(i,r[a],a,t))){return true}}return false}},!Y(t.some));var q=false;if(t.reduce){q=typeof t.reduce.call("es5",function(e,t,r,n){return n})==="object"}k(t,{reduce:function reduce(e){var t=A.ToObject(this);var r=X&&N(this)?J(this,""):t;var n=A.ToUint32(r.length);if(!w(e)){throw new TypeError("Array.prototype.reduce callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var a;if(arguments.length>=2){a=arguments[1]}else{do{if(i in r){a=r[i++];break}if(++i>=n){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<n;i++){if(i in r){a=e(a,r[i],i,t)}}return a}},!q);var K=false;if(t.reduceRight){K=typeof t.reduceRight.call("es5",function(e,t,r,n){return n})==="object"}k(t,{reduceRight:function reduceRight(e){var t=A.ToObject(this);var r=X&&N(this)?J(this,""):t;var n=A.ToUint32(r.length);if(!w(e)){throw new TypeError("Array.prototype.reduceRight callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduceRight of empty array with no initial value")}var i;var a=n-1;if(arguments.length>=2){i=arguments[1]}else{do{if(a in r){i=r[a--];break}if(--a<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(a<0){return i}do{if(a in r){i=e(i,r[a],a,t)}}while(a--);return i}},!K);var Q=t.indexOf&&[0,1].indexOf(1,2)!==-1;k(t,{indexOf:function indexOf(e){var t=X&&N(this)?J(this,""):A.ToObject(this);var r=A.ToUint32(t.length);if(r===0){return-1}var n=0;if(arguments.length>1){n=A.ToInteger(arguments[1])}n=n>=0?n:g(0,r+n);for(;n<r;n++){if(n in t&&t[n]===e){return n}}return-1}},Q);var V=t.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;k(t,{lastIndexOf:function lastIndexOf(e){var t=X&&N(this)?J(this,""):A.ToObject(this);var r=A.ToUint32(t.length);if(r===0){return-1}var n=r-1;if(arguments.length>1){n=y(n,A.ToInteger(arguments[1]))}n=n>=0?n:r-Math.abs(n);for(;n>=0;n--){if(n in t&&e===t[n]){return n}}return-1}},V);var W=function(){var e=[1,2];var t=e.splice();return e.length===2&&G(t)&&t.length===0}();k(t,{splice:function splice(e,t){if(arguments.length===0){return[]}else{return s.apply(this,arguments)}}},!W);var _=function(){var e={};t.splice.call(e,0,0,1);return e.length===1}();k(t,{splice:function splice(e,t){if(arguments.length===0){return[]}var r=arguments;this.length=g(A.ToInteger(this.length),0);if(arguments.length>0&&typeof t!=="number"){r=l.call(arguments);if(r.length<2){B(r,this.length-e)}else{r[1]=A.ToInteger(t)}}return s.apply(this,r)}},!_);var ee=function(){var t=new e(1e5);t[8]="x";t.splice(1,1);return t.indexOf("x")===7}();var te=function(){var e=256;var t=[];t[e]="a";t.splice(e+1,0,"b");return t[e]==="a"}();k(t,{splice:function splice(e,t){var r=A.ToObject(this);var n=[];var i=A.ToUint32(r.length);var o=A.ToInteger(e);var u=o<0?g(i+o,0):y(o,i);var f=y(g(A.ToInteger(t),0),i-u);var s=0;var c;while(s<f){c=a(u+s);if($(r,c)){n[s]=r[c]}s+=1}var v=l.call(arguments,2);var p=v.length;var h;if(p<f){s=u;while(s<i-f){c=a(s+f);h=a(s+p);if($(r,c)){r[h]=r[c]}else{delete r[h]}s+=1}s=i;while(s>i-f+p){delete r[s-1];s-=1}}else if(p>f){s=i-f;while(s>u){c=a(s+f-1);h=a(s+p-1);if($(r,c)){r[h]=r[c]}else{delete r[h]}s-=1}}s=u;for(var d=0;d<v.length;++d){r[s]=v[d];s+=1}r.length=i-f+p;return n}},!ee||!te);var re=[1,2].join(undefined)!=="1,2";var ne=t.join;k(t,{join:function join(e){return ne.call(this,typeof e==="undefined"?",":e)}},re);var ie=function push(e){var t=A.ToObject(this);var r=A.ToUint32(t.length);var n=0;while(n<arguments.length){t[r+n]=arguments[n];n+=1}t.length=r+n;return r+n};var ae=function(){var e={};var t=Array.prototype.push.call(e,undefined);return t!==1||e.length!==1||typeof e[0]!=="undefined"||!$(e,0)}();k(t,{push:function push(e){if(G(this)){return c.apply(this,arguments)}return ie.apply(this,arguments)}},ae);var oe=function(){var e=[];var t=e.push(undefined);return t!==1||e.length!==1||typeof e[0]!=="undefined"||!$(e,0)}();k(t,{push:ie},oe);var ue=!{toString:null}.propertyIsEnumerable("toString");var fe=function(){}.propertyIsEnumerable("prototype");var le=!$("x","0");var se=function(e){var t=e.constructor;return t&&t.prototype===e};var ce={$window:true,$console:true,$parent:true,$self:true,$frame:true,$frames:true,$frameElement:true,$webkitIndexedDB:true,$webkitStorageInfo:true};var ve=function(){if(typeof window==="undefined"){return false}for(var e in window){try{if(!ce["$"+e]&&$(window,e)&&window[e]!==null&&typeof window[e]==="object"){se(window[e])}}catch(t){return true}}return false}();var pe=function(e){if(typeof window==="undefined"||!ve){return se(e)}try{return se(e)}catch(t){return false}};var he=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var ge=he.length;var ye=function isArguments(e){return C(e)==="[object Arguments]"};var de=function isArguments(e){return e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&!G(e)&&w(e.callee)};var me=ye(arguments)?ye:de;k(r,{keys:function keys(e){var t=w(e);var r=me(e);var n=e!==null&&typeof e==="object";var i=n&&N(e);if(!n&&!t&&!r){throw new TypeError("Object.keys called on a non-object")}var o=[];var u=fe&&t;if(i&&le||r){for(var f=0;f<e.length;++f){B(o,a(f))}}if(!r){for(var l in e){if(!(u&&l==="prototype")&&$(e,l)){B(o,a(l))}}}if(ue){var s=pe(e);for(var c=0;c<ge;c++){var v=he[c];if(!(s&&v==="constructor")&&$(e,v)){B(o,v)}}}return o}});var we=r.keys&&function(){return r.keys(arguments).length===2}(1,2);var be=r.keys&&function(){var e=r.keys(arguments);return arguments.length!==1||e.length!==1||e[0]!==1}(1);var Te=r.keys;k(r,{keys:function keys(e){if(me(e)){return Te(l.call(e))}else{return Te(e)}}},!we||be);var xe=-621987552e5;var Oe="-000001";var Se=Date.prototype.toISOString&&new Date(xe).toISOString().indexOf(Oe)===-1;var Ie=Date.prototype.toISOString&&new Date(-1).toISOString()!=="1969-12-31T23:59:59.999Z";k(Date.prototype,{toISOString:function toISOString(){var e,t,r,n,i;if(!isFinite(this)){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}n=this.getUTCFullYear();i=this.getUTCMonth();n+=Math.floor(i/12);i=(i%12+12)%12;e=[i+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];n=(n<0?"-":n>9999?"+":"")+Z("00000"+Math.abs(n),0<=n&&n<=9999?-4:-6);t=e.length;while(t--){r=e[t];if(r<10){e[t]="0"+r}}return n+"-"+l.call(e,0,2).join("-")+"T"+l.call(e,2).join(":")+"."+Z("000"+this.getUTCMilliseconds(),-3)+"Z"}},Se||Ie);var je=function(){try{return Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(xe).toJSON().indexOf(Oe)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(e){return false}}();if(!je){Date.prototype.toJSON=function toJSON(e){var t=r(this);var n=A.ToPrimitive(t);if(typeof n==="number"&&!isFinite(n)){return null}var i=t.toISOString;if(!w(i)){throw new TypeError("toISOString property is not callable")}return i.call(t)}}var Ee=Date.parse("+033658-09-27T01:46:40.000Z")===1e15;var Ne=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z"));var De=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(De||Ne||!Ee){var Me=Math.pow(2,31)-1;var Ue=Math.floor(Me/1e3);var ke=F(new Date(1970,0,1,0,0,0,Me+1).getTime());Date=function(e){var t=function Date(r,n,i,o,u,f,l){var s=arguments.length;var c;if(this instanceof e){var v=f;var p=l;if(ke&&s>=7&&l>Me){var h=Math.floor(l/Me)*Me;var g=Math.floor(h/1e3);v+=g;p-=g*1e3}c=s===1&&a(r)===r?new e(t.parse(r)):s>=7?new e(r,n,i,o,u,v,p):s>=6?new e(r,n,i,o,u,v):s>=5?new e(r,n,i,o,u):s>=4?new e(r,n,i,o):s>=3?new e(r,n,i):s>=2?new e(r,n):s>=1?new e(r):new e}else{c=e.apply(this,arguments)}if(!R(c)){k(c,{constructor:t},true)}return c};var r=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var n=[0,31,59,90,120,151,181,212,243,273,304,334,365];var i=function dayFromMonth(e,t){var r=t>1?1:0;return n[t]+Math.floor((e-1969+r)/4)-Math.floor((e-1901+r)/100)+Math.floor((e-1601+r)/400)+365*(e-1970)};var o=function toUTC(t){var r=0;var n=t;if(ke&&n>Me){var i=Math.floor(n/Me)*Me;var a=Math.floor(i/1e3);r+=a;n-=a*1e3}return u(new e(1970,0,1,0,0,r,n))};for(var f in e){if($(e,f)){t[f]=e[f]}}k(t,{now:e.now,UTC:e.UTC},true);t.prototype=e.prototype;k(t.prototype,{constructor:t},true);var l=function parse(t){var n=r.exec(t);if(n){var a=u(n[1]),f=u(n[2]||1)-1,l=u(n[3]||1)-1,s=u(n[4]||0),c=u(n[5]||0),v=u(n[6]||0),p=Math.floor(u(n[7]||0)*1e3),h=Boolean(n[4]&&!n[8]),g=n[9]==="-"?1:-1,y=u(n[10]||0),d=u(n[11]||0),m;var w=c>0||v>0||p>0;if(s<(w?24:25)&&c<60&&v<60&&p<1e3&&f>-1&&f<12&&y<24&&d<60&&l>-1&&l<i(a,f+1)-i(a,f)){m=((i(a,f)+l)*24+s+y*g)*60;m=((m+c+d*g)*60+v)*1e3+p;if(h){m=o(m)}if(-864e13<=m&&m<=864e13){return m}}return NaN}return e.parse.apply(this,arguments)};k(t,{parse:l});return t}(Date)}if(!Date.now){Date.now=function now(){return(new Date).getTime()}}var Re=f.toFixed&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128");var Fe={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function multiply(e,t){var r=-1;var n=t;while(++r<Fe.size){n+=e*Fe.data[r];Fe.data[r]=n%Fe.base;n=Math.floor(n/Fe.base)}},divide:function divide(e){var t=Fe.size,r=0;while(--t>=0){r+=Fe.data[t];Fe.data[t]=Math.floor(r/e);r=r%e*Fe.base}},numToString:function numToString(){var e=Fe.size;var t="";while(--e>=0){if(t!==""||e===0||Fe.data[e]!==0){var r=a(Fe.data[e]);if(t===""){t=r}else{t+=Z("0000000",0,7-r.length)+r}}}return t},pow:function pow(e,t,r){return t===0?r:t%2===1?pow(e,t-1,r*e):pow(e*e,t/2,r)},log:function log(e){var t=0;var r=e;while(r>=4096){t+=12;r/=4096}while(r>=2){t+=1;r/=2}return t}};var Ae=function toFixed(e){var t,r,n,i,o,f,l,s;t=u(e);t=F(t)?0:Math.floor(t);if(t<0||t>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}r=u(this);if(F(r)){return"NaN"}if(r<=-1e21||r>=1e21){return a(r)}n="";if(r<0){n="-";r=-r}i="0";if(r>1e-21){o=Fe.log(r*Fe.pow(2,69,1))-69;f=o<0?r*Fe.pow(2,-o,1):r/Fe.pow(2,o,1);f*=4503599627370496;o=52-o;if(o>0){Fe.multiply(0,f);l=t;while(l>=7){Fe.multiply(1e7,0);l-=7}Fe.multiply(Fe.pow(10,l,1),0);l=o-1;while(l>=23){Fe.divide(1<<23);l-=23}Fe.divide(1<<l);Fe.multiply(1,1);Fe.divide(2);i=Fe.numToString()}else{Fe.multiply(0,f);Fe.multiply(1<<-o,0);i=Fe.numToString()+Z("0.00000000000000000000",2,2+t)}}if(t>0){s=i.length;if(s<=t){i=n+Z("0.0000000000000000000",0,t-s+2)+i}else{i=n+Z(i,0,s-t)+"."+Z(i,s-t)}}else{i=n+i}return i};k(f,{toFixed:Ae},Re);var Pe=function(){try{return 1..toPrecision(undefined)==="1"}catch(e){return true}}();var $e=f.toPrecision;k(f,{toPrecision:function toPrecision(e){return typeof e==="undefined"?$e.call(this):$e.call(this,e)}},Pe);if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var e=typeof/()??/.exec("")[1]==="undefined";var t=Math.pow(2,32)-1;o.split=function(r,n){var i=this;if(typeof r==="undefined"&&n===0){return[]}if(!S(r)){return J(this,r,n)}var a=[];var o=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(r.sticky?"y":""),u=0,f,s,v,p;var h=new RegExp(r.source,o+"g");i+="";if(!e){f=new RegExp("^"+h.source+"$(?!\\s)",o)}var g=typeof n==="undefined"?t:A.ToUint32(n);s=h.exec(i);while(s){v=s.index+s[0].length;if(v>u){B(a,Z(i,u,s.index));if(!e&&s.length>1){s[0].replace(f,function(){for(var e=1;e<arguments.length-2;e++){if(typeof arguments[e]==="undefined"){s[e]=void 0}}})}if(s.length>1&&s.index<i.length){c.apply(a,l.call(s,1))}p=s[0].length;u=v;if(a.length>=g){break}}if(h.lastIndex===s.index){h.lastIndex++}s=h.exec(i)}if(u===i.length){if(p||!h.test("")){B(a,"")}}else{B(a,Z(i,u))}return a.length>g?Z(a,0,g):a}})()}else if("0".split(void 0,0).length){o.split=function split(e,t){if(typeof e==="undefined"&&t===0){return[]}return J(this,e,t)}}var Ce=o.replace;var Ze=function(){var e=[];"x".replace(/x(.)?/g,function(t,r){B(e,r)});return e.length===1&&typeof e[0]==="undefined"}();if(!Ze){o.replace=function replace(e,t){var r=w(t);var n=S(e)&&/\)[*?]/.test(e.source);if(!r||!n){return Ce.call(this,e,t)}else{var i=function(r){var n=arguments.length;var i=e.lastIndex;e.lastIndex=0;var a=e.exec(r)||[];e.lastIndex=i;B(a,arguments[n-2],arguments[n-1]);return t.apply(this,a)};return Ce.call(this,e,i)}}}var Je=o.substr;var ze="".substr&&"0b".substr(-1)!=="b";k(o,{substr:function substr(e,t){var r=e;if(e<0){r=g(this.length+e,0)}return Je.call(this,r,t)}},ze);var Be=" \n\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";var Ge="\u200b";var He="["+Be+"]";var Le=new RegExp("^"+He+He+"*");var Xe=new RegExp(He+He+"*$");var Ye=o.trim&&(Be.trim()||!Ge.trim());k(o,{trim:function trim(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}return a(this).replace(Le,"").replace(Xe,"")}},Ye);var qe=o.lastIndexOf&&"abc\u3042\u3044".lastIndexOf("\u3042\u3044",2)!==-1;k(o,{lastIndexOf:function lastIndexOf(e){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var t=a(this);var r=a(e);var n=arguments.length>1?u(arguments[1]):NaN;var i=F(n)?Infinity:A.ToInteger(n);var o=y(g(i,0),t.length);var f=r.length;var l=o+f;while(l>0){l=g(0,l-f);var s=z(Z(t,l,o+f),r);if(s!==-1){return l+s}}return-1}},qe);var Ke=o.lastIndexOf;k(o,{lastIndexOf:function lastIndexOf(e){return Ke.apply(this,arguments)}},o.lastIndexOf.length!==1);if(parseInt(Be+"08")!==8||parseInt(Be+"0x16")!==22){parseInt=function(e){var t=/^[\-+]?0[xX]/;return function parseInt(r,n){var i=a(r).trim();var o=u(n)||(t.test(i)?16:10);return e(i,o)}}(parseInt)}if(String(new RangeError("test"))!=="RangeError: test"){var Qe=Error.prototype.toString;var Ve=function toString(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var e=this.name;if(typeof e==="undefined"){e="Error"}else if(typeof e!=="string"){e=a(e)}var t=this.message;if(typeof t==="undefined"){t=""}else if(typeof t!=="string"){t=a(t)}if(!e){return t}if(!t){return e}return e+": "+t};Error.prototype.toString=Ve}}); | ||
(function(r,t){"use strict";if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{r.returnExports=t()}})(this,function(){var r=Array;var t=r.prototype;var e=Object;var n=e.prototype;var i=Function.prototype;var a=String;var o=a.prototype;var u=Number;var f=u.prototype;var l=t.slice;var s=t.splice;var c=t.push;var v=t.unshift;var p=t.concat;var h=i.call;var g=i.apply;var y=Math.max;var d=Math.min;var m=n.toString;var w=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var b;var T=Function.prototype.toString,x=function tryFunctionObject(r){try{T.call(r);return true}catch(t){return false}},O="[object Function]",S="[object GeneratorFunction]";b=function isCallable(r){if(typeof r!=="function"){return false}if(w){return x(r)}var t=m.call(r);return t===O||t===S};var E;var j=RegExp.prototype.exec,I=function tryRegexExec(r){try{j.call(r);return true}catch(t){return false}},D="[object RegExp]";E=function isRegex(r){if(typeof r!=="object"){return false}return w?I(r):m.call(r)===D};var N;var k=String.prototype.valueOf,M=function tryStringObject(r){try{k.call(r);return true}catch(t){return false}},U="[object String]";N=function isString(r){if(typeof r==="string"){return true}if(typeof r!=="object"){return false}return w?M(r):m.call(r)===U};var R=e.defineProperty&&function(){try{var r={};e.defineProperty(r,"x",{enumerable:false,value:r});for(var t in r){return false}return r.x===r}catch(n){return false}}();var F=function(r){var t;if(R){t=function(r,t,n,i){if(!i&&t in r){return}e.defineProperty(r,t,{configurable:true,enumerable:false,writable:true,value:n})}}else{t=function(r,t,e,n){if(!n&&t in r){return}r[t]=e}}return function defineProperties(e,n,i){for(var a in n){if(r.call(n,a)){t(e,a,n[a],i)}}}}(n.hasOwnProperty);var A=function isPrimitive(r){var t=typeof r;return r===null||t!=="object"&&t!=="function"};var P=u.isNaN||function(r){return r!==r};var $={ToInteger:function ToInteger(r){var t=+r;if(P(t)){t=0}else if(t!==0&&t!==1/0&&t!==-(1/0)){t=(t>0||-1)*Math.floor(Math.abs(t))}return t},ToPrimitive:function ToPrimitive(r){var t,e,n;if(A(r)){return r}e=r.valueOf;if(b(e)){t=e.call(r);if(A(t)){return t}}n=r.toString;if(b(n)){t=n.call(r);if(A(t)){return t}}throw new TypeError},ToObject:function(r){if(r==null){throw new TypeError("can't convert "+r+" to object")}return e(r)},ToUint32:function ToUint32(r){return r>>>0}};var C=function Empty(){};F(i,{bind:function bind(r){var t=this;if(!b(t)){throw new TypeError("Function.prototype.bind called on incompatible "+t)}var n=l.call(arguments,1);var i;var a=function(){if(this instanceof i){var a=t.apply(this,p.call(n,l.call(arguments)));if(e(a)===a){return a}return this}else{return t.apply(r,p.call(n,l.call(arguments)))}};var o=y(0,t.length-n.length);var u=[];for(var f=0;f<o;f++){c.call(u,"$"+f)}i=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this, arguments); }")(a);if(t.prototype){C.prototype=t.prototype;i.prototype=new C;C.prototype=null}return i}});var Z=h.bind(n.hasOwnProperty);var J=h.bind(n.toString);var z=h.bind(l);var B=g.bind(l);var G=h.bind(o.slice);var H=h.bind(o.split);var L=h.bind(o.indexOf);var X=h.bind(c);var Y=h.bind(n.propertyIsEnumerable);var q=h.bind(t.sort);var K=r.isArray||function isArray(r){return J(r)==="[object Array]"};var Q=[].unshift(0)!==1;F(t,{unshift:function(){v.apply(this,arguments);return this.length}},Q);F(r,{isArray:K});var V=e("a");var W=V[0]!=="a"||!(0 in V);var _=function properlyBoxed(r){var t=true;var e=true;if(r){r.call("foo",function(r,e,n){if(typeof n!=="object"){t=false}});r.call([1],function(){"use strict";e=typeof this==="string"},"x")}return!!r&&t&&e};F(t,{forEach:function forEach(r){var t=$.ToObject(this);var e=W&&N(this)?H(this,""):t;var n=-1;var i=$.ToUint32(e.length);var a;if(arguments.length>1){a=arguments[1]}if(!b(r)){throw new TypeError("Array.prototype.forEach callback must be a function")}while(++n<i){if(n in e){if(typeof a==="undefined"){r(e[n],n,t)}else{r.call(a,e[n],n,t)}}}}},!_(t.forEach));F(t,{map:function map(t){var e=$.ToObject(this);var n=W&&N(this)?H(this,""):e;var i=$.ToUint32(n.length);var a=r(i);var o;if(arguments.length>1){o=arguments[1]}if(!b(t)){throw new TypeError("Array.prototype.map callback must be a function")}for(var u=0;u<i;u++){if(u in n){if(typeof o==="undefined"){a[u]=t(n[u],u,e)}else{a[u]=t.call(o,n[u],u,e)}}}return a}},!_(t.map));F(t,{filter:function filter(r){var t=$.ToObject(this);var e=W&&N(this)?H(this,""):t;var n=$.ToUint32(e.length);var i=[];var a;var o;if(arguments.length>1){o=arguments[1]}if(!b(r)){throw new TypeError("Array.prototype.filter callback must be a function")}for(var u=0;u<n;u++){if(u in e){a=e[u];if(typeof o==="undefined"?r(a,u,t):r.call(o,a,u,t)){X(i,a)}}}return i}},!_(t.filter));F(t,{every:function every(r){var t=$.ToObject(this);var e=W&&N(this)?H(this,""):t;var n=$.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!b(r)){throw new TypeError("Array.prototype.every callback must be a function")}for(var a=0;a<n;a++){if(a in e&&!(typeof i==="undefined"?r(e[a],a,t):r.call(i,e[a],a,t))){return false}}return true}},!_(t.every));F(t,{some:function some(r){var t=$.ToObject(this);var e=W&&N(this)?H(this,""):t;var n=$.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!b(r)){throw new TypeError("Array.prototype.some callback must be a function")}for(var a=0;a<n;a++){if(a in e&&(typeof i==="undefined"?r(e[a],a,t):r.call(i,e[a],a,t))){return true}}return false}},!_(t.some));var rr=false;if(t.reduce){rr=typeof t.reduce.call("es5",function(r,t,e,n){return n})==="object"}F(t,{reduce:function reduce(r){var t=$.ToObject(this);var e=W&&N(this)?H(this,""):t;var n=$.ToUint32(e.length);if(!b(r)){throw new TypeError("Array.prototype.reduce callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var a;if(arguments.length>=2){a=arguments[1]}else{do{if(i in e){a=e[i++];break}if(++i>=n){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<n;i++){if(i in e){a=r(a,e[i],i,t)}}return a}},!rr);var tr=false;if(t.reduceRight){tr=typeof t.reduceRight.call("es5",function(r,t,e,n){return n})==="object"}F(t,{reduceRight:function reduceRight(r){var t=$.ToObject(this);var e=W&&N(this)?H(this,""):t;var n=$.ToUint32(e.length);if(!b(r)){throw new TypeError("Array.prototype.reduceRight callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduceRight of empty array with no initial value")}var i;var a=n-1;if(arguments.length>=2){i=arguments[1]}else{do{if(a in e){i=e[a--];break}if(--a<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(a<0){return i}do{if(a in e){i=r(i,e[a],a,t)}}while(a--);return i}},!tr);var er=t.indexOf&&[0,1].indexOf(1,2)!==-1;F(t,{indexOf:function indexOf(r){var t=W&&N(this)?H(this,""):$.ToObject(this);var e=$.ToUint32(t.length);if(e===0){return-1}var n=0;if(arguments.length>1){n=$.ToInteger(arguments[1])}n=n>=0?n:y(0,e+n);for(;n<e;n++){if(n in t&&t[n]===r){return n}}return-1}},er);var nr=t.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;F(t,{lastIndexOf:function lastIndexOf(r){var t=W&&N(this)?H(this,""):$.ToObject(this);var e=$.ToUint32(t.length);if(e===0){return-1}var n=e-1;if(arguments.length>1){n=d(n,$.ToInteger(arguments[1]))}n=n>=0?n:e-Math.abs(n);for(;n>=0;n--){if(n in t&&r===t[n]){return n}}return-1}},nr);var ir=function(){var r=[1,2];var t=r.splice();return r.length===2&&K(t)&&t.length===0}();F(t,{splice:function splice(r,t){if(arguments.length===0){return[]}else{return s.apply(this,arguments)}}},!ir);var ar=function(){var r={};t.splice.call(r,0,0,1);return r.length===1}();F(t,{splice:function splice(r,t){if(arguments.length===0){return[]}var e=arguments;this.length=y($.ToInteger(this.length),0);if(arguments.length>0&&typeof t!=="number"){e=z(arguments);if(e.length<2){X(e,this.length-r)}else{e[1]=$.ToInteger(t)}}return s.apply(this,e)}},!ar);var or=function(){var t=new r(1e5);t[8]="x";t.splice(1,1);return t.indexOf("x")===7}();var ur=function(){var r=256;var t=[];t[r]="a";t.splice(r+1,0,"b");return t[r]==="a"}();F(t,{splice:function splice(r,t){var e=$.ToObject(this);var n=[];var i=$.ToUint32(e.length);var o=$.ToInteger(r);var u=o<0?y(i+o,0):d(o,i);var f=d(y($.ToInteger(t),0),i-u);var l=0;var s;while(l<f){s=a(u+l);if(Z(e,s)){n[l]=e[s]}l+=1}var c=z(arguments,2);var v=c.length;var p;if(v<f){l=u;while(l<i-f){s=a(l+f);p=a(l+v);if(Z(e,s)){e[p]=e[s]}else{delete e[p]}l+=1}l=i;while(l>i-f+v){delete e[l-1];l-=1}}else if(v>f){l=i-f;while(l>u){s=a(l+f-1);p=a(l+v-1);if(Z(e,s)){e[p]=e[s]}else{delete e[p]}l-=1}}l=u;for(var h=0;h<c.length;++h){e[l]=c[h];l+=1}e.length=i-f+v;return n}},!or||!ur);var fr=t.join;var lr=Array.prototype.join.call("123",",")!=="1,2,3";if(lr){F(t,{join:function join(r){var t=typeof r==="undefined"?",":r;return fr.call(N(this)?H(this,""):this,t)}},lr)}var sr=[1,2].join(undefined)!=="1,2";if(sr){F(t,{join:function join(r){var t=typeof r==="undefined"?",":r;return fr.call(this,t)}},sr)}var cr=function push(r){var t=$.ToObject(this);var e=$.ToUint32(t.length);var n=0;while(n<arguments.length){t[e+n]=arguments[n];n+=1}t.length=e+n;return e+n};var vr=function(){var r={};var t=Array.prototype.push.call(r,undefined);return t!==1||r.length!==1||typeof r[0]!=="undefined"||!Z(r,0)}();F(t,{push:function push(r){if(K(this)){return c.apply(this,arguments)}return cr.apply(this,arguments)}},vr);var pr=function(){var r=[];var t=r.push(undefined);return t!==1||r.length!==1||typeof r[0]!=="undefined"||!Z(r,0)}();F(t,{push:cr},pr);F(t,{slice:function(r,t){var e=N(this)?H(this,""):this;return B(e,arguments)}},W);var hr=function(){try{[1,2].sort(null);[1,2].sort({});return true}catch(r){}return false}();var gr=function(){try{[1,2].sort(/a/);return false}catch(r){}return true}();var yr=function(){try{[1,2].sort(undefined);return true}catch(r){}return false}();F(t,{sort:function sort(r){if(typeof r==="undefined"){return q(this)}if(!b(r)){throw new TypeError("Array.prototype.sort callback must be a function")}return q(this,r)}},hr||!yr||!gr);var dr=!{toString:null}.propertyIsEnumerable("toString");var mr=function(){}.propertyIsEnumerable("prototype");var wr=!Z("x","0");var br=function(r){var t=r.constructor;return t&&t.prototype===r};var Tr={$window:true,$console:true,$parent:true,$self:true,$frame:true,$frames:true,$frameElement:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$external:true};var xr=function(){if(typeof window==="undefined"){return false}for(var r in window){try{if(!Tr["$"+r]&&Z(window,r)&&window[r]!==null&&typeof window[r]==="object"){br(window[r])}}catch(t){return true}}return false}();var Or=function(r){if(typeof window==="undefined"||!xr){return br(r)}try{return br(r)}catch(t){return false}};var Sr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var Er=Sr.length;var jr=function isArguments(r){return J(r)==="[object Arguments]"};var Ir=function isArguments(r){return r!==null&&typeof r==="object"&&typeof r.length==="number"&&r.length>=0&&!K(r)&&b(r.callee)};var Dr=jr(arguments)?jr:Ir;F(e,{keys:function keys(r){var t=b(r);var e=Dr(r);var n=r!==null&&typeof r==="object";var i=n&&N(r);if(!n&&!t&&!e){throw new TypeError("Object.keys called on a non-object")}var o=[];var u=mr&&t;if(i&&wr||e){for(var f=0;f<r.length;++f){X(o,a(f))}}if(!e){for(var l in r){if(!(u&&l==="prototype")&&Z(r,l)){X(o,a(l))}}}if(dr){var s=Or(r);for(var c=0;c<Er;c++){var v=Sr[c];if(!(s&&v==="constructor")&&Z(r,v)){X(o,v)}}}return o}});var Nr=e.keys&&function(){return e.keys(arguments).length===2}(1,2);var kr=e.keys&&function(){var r=e.keys(arguments);return arguments.length!==1||r.length!==1||r[0]!==1}(1);var Mr=e.keys;F(e,{keys:function keys(r){if(Dr(r)){return Mr(z(r))}else{return Mr(r)}}},!Nr||kr);var Ur=-621987552e5;var Rr="-000001";var Fr=Date.prototype.toISOString&&new Date(Ur).toISOString().indexOf(Rr)===-1;var Ar=Date.prototype.toISOString&&new Date(-1).toISOString()!=="1969-12-31T23:59:59.999Z";F(Date.prototype,{toISOString:function toISOString(){var r,t,e,n,i;if(!isFinite(this)){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}n=this.getUTCFullYear();i=this.getUTCMonth();n+=Math.floor(i/12);i=(i%12+12)%12;r=[i+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];n=(n<0?"-":n>9999?"+":"")+G("00000"+Math.abs(n),0<=n&&n<=9999?-4:-6);t=r.length;while(t--){e=r[t];if(e<10){r[t]="0"+e}}return n+"-"+z(r,0,2).join("-")+"T"+z(r,2).join(":")+"."+G("000"+this.getUTCMilliseconds(),-3)+"Z"}},Fr||Ar);var Pr=function(){try{return Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(Ur).toJSON().indexOf(Rr)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(r){return false}}();if(!Pr){Date.prototype.toJSON=function toJSON(r){var t=e(this);var n=$.ToPrimitive(t);if(typeof n==="number"&&!isFinite(n)){return null}var i=t.toISOString;if(!b(i)){throw new TypeError("toISOString property is not callable")}return i.call(t)}}var $r=Date.parse("+033658-09-27T01:46:40.000Z")===1e15;var Cr=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z"));var Zr=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(Zr||Cr||!$r){var Jr=Math.pow(2,31)-1;var zr=P(new Date(1970,0,1,0,0,0,Jr+1).getTime());Date=function(r){var t=function Date(e,n,i,o,u,f,l){var s=arguments.length;var c;if(this instanceof r){var v=f;var p=l;if(zr&&s>=7&&l>Jr){var h=Math.floor(l/Jr)*Jr;var g=Math.floor(h/1e3);v+=g;p-=g*1e3}c=s===1&&a(e)===e?new r(t.parse(e)):s>=7?new r(e,n,i,o,u,v,p):s>=6?new r(e,n,i,o,u,v):s>=5?new r(e,n,i,o,u):s>=4?new r(e,n,i,o):s>=3?new r(e,n,i):s>=2?new r(e,n):s>=1?new r(e):new r}else{c=r.apply(this,arguments)}if(!A(c)){F(c,{constructor:t},true)}return c};var e=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var n=[0,31,59,90,120,151,181,212,243,273,304,334,365];var i=function dayFromMonth(r,t){var e=t>1?1:0;return n[t]+Math.floor((r-1969+e)/4)-Math.floor((r-1901+e)/100)+Math.floor((r-1601+e)/400)+365*(r-1970)};var o=function toUTC(t){var e=0;var n=t;if(zr&&n>Jr){var i=Math.floor(n/Jr)*Jr;var a=Math.floor(i/1e3);e+=a;n-=a*1e3}return u(new r(1970,0,1,0,0,e,n))};for(var f in r){if(Z(r,f)){t[f]=r[f]}}F(t,{now:r.now,UTC:r.UTC},true);t.prototype=r.prototype;F(t.prototype,{constructor:t},true);var l=function parse(t){var n=e.exec(t);if(n){var a=u(n[1]),f=u(n[2]||1)-1,l=u(n[3]||1)-1,s=u(n[4]||0),c=u(n[5]||0),v=u(n[6]||0),p=Math.floor(u(n[7]||0)*1e3),h=Boolean(n[4]&&!n[8]),g=n[9]==="-"?1:-1,y=u(n[10]||0),d=u(n[11]||0),m;var w=c>0||v>0||p>0;if(s<(w?24:25)&&c<60&&v<60&&p<1e3&&f>-1&&f<12&&y<24&&d<60&&l>-1&&l<i(a,f+1)-i(a,f)){m=((i(a,f)+l)*24+s+y*g)*60;m=((m+c+d*g)*60+v)*1e3+p;if(h){m=o(m)}if(-864e13<=m&&m<=864e13){return m}}return NaN}return r.parse.apply(this,arguments)};F(t,{parse:l});return t}(Date)}if(!Date.now){Date.now=function now(){return(new Date).getTime()}}var Br=f.toFixed&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128");var Gr={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function multiply(r,t){var e=-1;var n=t;while(++e<Gr.size){n+=r*Gr.data[e];Gr.data[e]=n%Gr.base;n=Math.floor(n/Gr.base)}},divide:function divide(r){var t=Gr.size,e=0;while(--t>=0){e+=Gr.data[t];Gr.data[t]=Math.floor(e/r);e=e%r*Gr.base}},numToString:function numToString(){var r=Gr.size;var t="";while(--r>=0){if(t!==""||r===0||Gr.data[r]!==0){var e=a(Gr.data[r]);if(t===""){t=e}else{t+=G("0000000",0,7-e.length)+e}}}return t},pow:function pow(r,t,e){return t===0?e:t%2===1?pow(r,t-1,e*r):pow(r*r,t/2,e)},log:function log(r){var t=0;var e=r;while(e>=4096){t+=12;e/=4096}while(e>=2){t+=1;e/=2}return t}};var Hr=function toFixed(r){var t,e,n,i,o,f,l,s;t=u(r);t=P(t)?0:Math.floor(t);if(t<0||t>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}e=u(this);if(P(e)){return"NaN"}if(e<=-1e21||e>=1e21){return a(e)}n="";if(e<0){n="-";e=-e}i="0";if(e>1e-21){o=Gr.log(e*Gr.pow(2,69,1))-69;f=o<0?e*Gr.pow(2,-o,1):e/Gr.pow(2,o,1);f*=4503599627370496;o=52-o;if(o>0){Gr.multiply(0,f);l=t;while(l>=7){Gr.multiply(1e7,0);l-=7}Gr.multiply(Gr.pow(10,l,1),0);l=o-1;while(l>=23){Gr.divide(1<<23);l-=23}Gr.divide(1<<l);Gr.multiply(1,1);Gr.divide(2);i=Gr.numToString()}else{Gr.multiply(0,f);Gr.multiply(1<<-o,0);i=Gr.numToString()+G("0.00000000000000000000",2,2+t)}}if(t>0){s=i.length;if(s<=t){i=n+G("0.0000000000000000000",0,t-s+2)+i}else{i=n+G(i,0,s-t)+"."+G(i,s-t)}}else{i=n+i}return i};F(f,{toFixed:Hr},Br);var Lr=function(){try{return 1..toPrecision(undefined)==="1"}catch(r){return true}}();var Xr=f.toPrecision;F(f,{toPrecision:function toPrecision(r){return typeof r==="undefined"?Xr.call(this):Xr.call(this,r)}},Lr);if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var r=typeof/()??/.exec("")[1]==="undefined";var t=Math.pow(2,32)-1;o.split=function(e,n){var i=String(this);if(typeof e==="undefined"&&n===0){return[]}if(!E(e)){return H(this,e,n)}var a=[];var o=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,f,l,s,v;var p=new RegExp(e.source,o+"g");if(!r){f=new RegExp("^"+p.source+"$(?!\\s)",o)}var h=typeof n==="undefined"?t:$.ToUint32(n);l=p.exec(i);while(l){s=l.index+l[0].length;if(s>u){X(a,G(i,u,l.index));if(!r&&l.length>1){l[0].replace(f,function(){for(var r=1;r<arguments.length-2;r++){if(typeof arguments[r]==="undefined"){l[r]=void 0}}})}if(l.length>1&&l.index<i.length){c.apply(a,z(l,1))}v=l[0].length;u=s;if(a.length>=h){break}}if(p.lastIndex===l.index){p.lastIndex++}l=p.exec(i)}if(u===i.length){if(v||!p.test("")){X(a,"")}}else{X(a,G(i,u))}return a.length>h?G(a,0,h):a}})()}else if("0".split(void 0,0).length){o.split=function split(r,t){if(typeof r==="undefined"&&t===0){return[]}return H(this,r,t)}}var Yr=o.replace;var qr=function(){var r=[];"x".replace(/x(.)?/g,function(t,e){X(r,e)});return r.length===1&&typeof r[0]==="undefined"}();if(!qr){o.replace=function replace(r,t){var e=b(t);var n=E(r)&&/\)[*?]/.test(r.source);if(!e||!n){return Yr.call(this,r,t)}else{var i=function(e){var n=arguments.length;var i=r.lastIndex;r.lastIndex=0;var a=r.exec(e)||[];r.lastIndex=i;X(a,arguments[n-2],arguments[n-1]);return t.apply(this,a)};return Yr.call(this,r,i)}}}var Kr=o.substr;var Qr="".substr&&"0b".substr(-1)!=="b";F(o,{substr:function substr(r,t){var e=r;if(r<0){e=y(this.length+r,0)}return Kr.call(this,e,t)}},Qr);var Vr=" \n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";var Wr="\u200b";var _r="["+Vr+"]";var rt=new RegExp("^"+_r+_r+"*");var tt=new RegExp(_r+_r+"*$");var et=o.trim&&(Vr.trim()||!Wr.trim());F(o,{trim:function trim(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}return a(this).replace(rt,"").replace(tt,"")}},et);var nt=o.lastIndexOf&&"abc\u3042\u3044".lastIndexOf("\u3042\u3044",2)!==-1;F(o,{lastIndexOf:function lastIndexOf(r){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var t=a(this);var e=a(r);var n=arguments.length>1?u(arguments[1]):NaN;var i=P(n)?Infinity:$.ToInteger(n);var o=d(y(i,0),t.length);var f=e.length;var l=o+f;while(l>0){l=y(0,l-f);var s=L(G(t,l,o+f),e);if(s!==-1){return l+s}}return-1}},nt);var it=o.lastIndexOf;F(o,{lastIndexOf:function lastIndexOf(r){return it.apply(this,arguments)}},o.lastIndexOf.length!==1);if(parseInt(Vr+"08")!==8||parseInt(Vr+"0x16")!==22){parseInt=function(r){var t=/^[\-+]?0[xX]/;return function parseInt(e,n){var i=a(e).trim();var o=u(n)||(t.test(i)?16:10);return r(i,o)}}(parseInt)}if(String(new RangeError("test"))!=="RangeError: test"){var at=function toString(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var r=this.name;if(typeof r==="undefined"){r="Error"}else if(typeof r!=="string"){r=a(r)}var t=this.message;if(typeof t==="undefined"){t=""}else if(typeof t!=="string"){t=a(t)}if(!r){return t}if(!t){return r}return r+": "+t};Error.prototype.toString=at}if(R){var ot=function(r,t){if(Y(r,t)){var e=Object.getOwnPropertyDescriptor(r,t);e.enumerable=false;Object.defineProperty(r,t,e)}};ot(Error.prototype,"message");if(Error.prototype.message!==""){Error.prototype.message=""}ot(Error.prototype,"name")}if(String(/a/gim)!=="/a/gim"){var ut=function toString(){var r="/"+this.source+"/";if(this.global){r+="g"}if(this.ignoreCase){r+="i"}if(this.multiline){r+="m"}return r};RegExp.prototype.toString=ut}}); | ||
//# sourceMappingURL=es5-shim.map |
{ | ||
"name": "es5-shim", | ||
"version": "4.3.1", | ||
"version": "4.4.0", | ||
"description": "ECMAScript 5 compatibility shims for legacy JavaScript engines", | ||
@@ -36,9 +36,9 @@ "homepage": "http://github.com/es-shims/es5-shim/", | ||
"devDependencies": { | ||
"eslint": "^1.9.0", | ||
"eslint": "^1.10.1", | ||
"@ljharb/eslint-config": "^1.6.0", | ||
"jasmine-node": "^1.14.5", | ||
"jscs": "^2.5.1", | ||
"uglify-js": "^2.5.0", | ||
"jscs": "^2.6.0", | ||
"uglify-js": "^2.6.1", | ||
"replace": "^0.3.0", | ||
"semver": "^5.0.3" | ||
"semver": "^5.1.0" | ||
}, | ||
@@ -45,0 +45,0 @@ "engines": { |
@@ -171,3 +171,3 @@ /* global describe, it, xit, expect, beforeEach, jasmine */ | ||
expect(actual).toBeDefined(); | ||
expect(actual).toEqual(expected); | ||
expect(actual).toBe(expected); | ||
expect(isNaN(actual)).toBeFalsy(); | ||
@@ -174,0 +174,0 @@ }); |
@@ -1,2 +0,2 @@ | ||
/* global describe, it, expect */ | ||
/* global describe, it, xit, expect */ | ||
@@ -6,2 +6,14 @@ describe('Error', function () { | ||
var supportsDescriptors = Object.defineProperty && (function () { | ||
try { | ||
var obj = {}; | ||
Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); | ||
for (var _ in obj) { return false; } | ||
return obj.x === obj; | ||
} catch (e) { /* this is ES3 */ | ||
return false; | ||
} | ||
}()); | ||
var ifSupportsDescriptorsIt = supportsDescriptors ? it : xit; | ||
describe('#toString()', function () { | ||
@@ -23,3 +35,3 @@ it('stringifies a newed error properly', function () { | ||
error = e; | ||
}; | ||
} | ||
expect(error.name).toBe('RangeError'); | ||
@@ -30,2 +42,12 @@ expect(error.message).toBe(msg); | ||
}); | ||
describe('enumerability of prototype properties', function () { | ||
ifSupportsDescriptorsIt('#message', function () { | ||
expect(Object.prototype.propertyIsEnumerable.call(Error.prototype, 'message')).toBe(false); | ||
}); | ||
ifSupportsDescriptorsIt('#name', function () { | ||
expect(Object.prototype.propertyIsEnumerable.call(Error.prototype, 'name')).toBe(false); | ||
}); | ||
}); | ||
}); |
/* global describe, it, xit, expect, beforeEach, jasmine, window */ | ||
var supportsDescriptors = Object.defineProperty && (function () { | ||
try { | ||
var obj = {}; | ||
Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); | ||
for (var _ in obj) { return false; } | ||
return obj.x === obj; | ||
} catch (e) { /* this is ES3 */ | ||
return false; | ||
} | ||
}()); | ||
var ifWindowIt = typeof window === 'undefined' ? xit : it; | ||
@@ -133,4 +143,4 @@ var extensionsPreventible = typeof Object.preventExtensions === 'function' && (function () { | ||
var windowItemKeys, exception; | ||
var blacklistedKeys = ['window', 'console', 'parent', 'self', 'frame', 'frames', 'frameElement']; | ||
if (Object.defineProperty) { | ||
var blacklistedKeys = ['window', 'console', 'parent', 'self', 'frame', 'frames', 'frameElement', 'external']; | ||
if (supportsDescriptors) { | ||
Object.defineProperty(window, 'thrower', { configurable: true, get: function () { throw new RangeError('thrower!'); } }); | ||
@@ -146,7 +156,9 @@ } | ||
} | ||
expect(Array.isArray(windowItemKeys)).toEqual(true); | ||
expect(Array.isArray(windowItemKeys)).toBe(true); | ||
expect(exception).toBeUndefined(); | ||
} | ||
} | ||
delete window.thrower; | ||
if (supportsDescriptors) { | ||
delete window.thrower; | ||
} | ||
}); | ||
@@ -248,8 +260,10 @@ }); | ||
var descr = Object.getOwnPropertyDescriptor({ name: 'Testing' }, 'name'); | ||
var expected = { | ||
value: 'Testing', | ||
enumerable: true, | ||
writable: true, | ||
configurable: true | ||
}; | ||
expect(descr).not.toBeUndefined(); | ||
expect(descr.value).toBe('Testing'); | ||
expect(descr.writable).toBe(true); | ||
expect(descr.enumerable).toBe(true); | ||
expect(descr.configurable).toBe(true); | ||
expect(descr).toEqual(expected); | ||
}); | ||
@@ -264,18 +278,13 @@ | ||
it('should return a data descriptor', function () { | ||
var obj = Object.create({}, { | ||
name: { | ||
value: 'Testing', | ||
configurable: true, | ||
enumerable: true, | ||
writable: true | ||
} | ||
}); | ||
var expected = { | ||
value: 'Testing', | ||
configurable: true, | ||
enumerable: true, | ||
writable: true | ||
}; | ||
var obj = Object.create({}, { name: expected }); | ||
var descr = Object.getOwnPropertyDescriptor(obj, 'name'); | ||
expect(descr).not.toBeUndefined(); | ||
expect(descr.value).toBe('Testing'); | ||
expect(descr.writable).toBe(true); | ||
expect(descr.enumerable).toBe(true); | ||
expect(descr.configurable).toBe(true); | ||
expect(descr).toEqual(expected); | ||
}); | ||
@@ -327,3 +336,3 @@ | ||
expect(Object.getPrototypeOf(obj)).toBe(null); | ||
expect(Object.getPrototypeOf(obj) === null).toBe(true); | ||
}); | ||
@@ -341,3 +350,3 @@ }); | ||
Object.defineProperties(target, newProperties); | ||
expect(target.constructor).toEqual('new constructor'); | ||
expect(target.constructor).toBe('new constructor'); | ||
}); | ||
@@ -344,0 +353,0 @@ }); |
@@ -10,3 +10,3 @@ /* global describe, it, expect */ | ||
it('trims all ES5 whitespace', function () { | ||
expect(test.trim()).toEqual('Hello, World!'); | ||
expect(test.trim()).toBe('Hello, World!'); | ||
expect(test.trim().length).toBe(13); | ||
@@ -236,12 +236,12 @@ }); | ||
it('has basic support', function () { | ||
expect('abcab'.indexOf('a')).toEqual(0); | ||
expect('abcab'.indexOf('a', 1)).toEqual(3); | ||
expect('abcab'.indexOf('a', 4)).toEqual(-1); | ||
expect('abcab'.indexOf('a')).toBe(0); | ||
expect('abcab'.indexOf('a', 1)).toBe(3); | ||
expect('abcab'.indexOf('a', 4)).toBe(-1); | ||
}); | ||
it('works with unicode', function () { | ||
expect('あいabcあいabc'.indexOf('あい')).toEqual(0); | ||
expect('あいabcあいabc'.indexOf('あい', 0)).toEqual(0); | ||
expect('あいabcあいabc'.indexOf('あい', 1)).toEqual(5); | ||
expect('あいabcあいabc'.indexOf('あい', 6)).toEqual(-1); | ||
expect('あいabcあいabc'.indexOf('あい')).toBe(0); | ||
expect('あいabcあいabc'.indexOf('あい', 0)).toBe(0); | ||
expect('あいabcあいabc'.indexOf('あい', 1)).toBe(5); | ||
expect('あいabcあいabc'.indexOf('あい', 6)).toBe(-1); | ||
}); | ||
@@ -252,17 +252,17 @@ }); | ||
it('has the right length', function () { | ||
expect(String.prototype.lastIndexOf.length).toEqual(1); | ||
expect(String.prototype.lastIndexOf.length).toBe(1); | ||
}); | ||
it('has basic support', function () { | ||
expect('abcd'.lastIndexOf('d')).toEqual(3); | ||
expect('abcd'.lastIndexOf('d', 3)).toEqual(3); | ||
expect('abcd'.lastIndexOf('d', 2)).toEqual(-1); | ||
expect('abcd'.lastIndexOf('d')).toBe(3); | ||
expect('abcd'.lastIndexOf('d', 3)).toBe(3); | ||
expect('abcd'.lastIndexOf('d', 2)).toBe(-1); | ||
}); | ||
it('works with unicode', function () { | ||
expect('abcあい'.lastIndexOf('あい')).toEqual(3); | ||
expect('abcあい'.lastIndexOf('あい', 3)).toEqual(3); | ||
expect('abcあい'.lastIndexOf('あい', 2)).toEqual(-1); | ||
expect('abcあい'.lastIndexOf('あい')).toBe(3); | ||
expect('abcあい'.lastIndexOf('あい', 3)).toBe(3); | ||
expect('abcあい'.lastIndexOf('あい', 2)).toBe(-1); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
427360
38
8207