-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowser.js
3 lines (3 loc) · 2.44 KB
/
browser.js
1
2
3
// Copyright (c) 2023 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
var e,t;e=this,t=function(){"use strict";var e="function"==typeof Object.defineProperty?Object.defineProperty:null,t=Object.defineProperty,r=Object.prototype,n=r.toString,o=r.__defineGetter__,i=r.__defineSetter__,u=r.__lookupGetter__,l=r.__lookupSetter__,c=function(){try{return e({},"x",{}),!0}catch(e){return!1}}()?t:function(e,t,c){var a,f,p,y;if("object"!=typeof e||null===e||"[object Array]"===n.call(e))throw new TypeError("invalid argument. First argument must be an object. Value: `"+e+"`.");if("object"!=typeof c||null===c||"[object Array]"===n.call(c))throw new TypeError("invalid argument. Property descriptor must be an object. Value: `"+c+"`.");if((f="value"in c)&&(u.call(e,t)||l.call(e,t)?(a=e.__proto__,e.__proto__=r,delete e[t],e[t]=c.value,e.__proto__=a):e[t]=c.value),p="get"in c,y="set"in c,f&&(p||y))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return p&&o&&o.call(e,t,c.get),y&&i&&i.call(e,t,c.set),e};function a(e,t,r){c(e,t,{configurable:!1,enumerable:!1,writable:!1,value:r})}function f(e){return"number"==typeof e}var p="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function y(){return p&&"symbol"==typeof Symbol.toStringTag}var b=Object.prototype.toString,_=Object.prototype.hasOwnProperty,s="function"==typeof Symbol?Symbol.toStringTag:"",d=y()?function(e){var t,r,n,o,i;if(null==e)return b.call(e);r=e[s],i=s,t=null!=(o=e)&&_.call(o,i);try{e[s]=void 0}catch(t){return b.call(e)}return n=b.call(e),t?e[s]=r:delete e[s],n}:function(e){return b.call(e)},m=Number,v=m.prototype.toString,g=y();function j(e){return"object"==typeof e&&(e instanceof m||(g?function(e){try{return v.call(e),!0}catch(e){return!1}}(e):"[object Number]"===d(e)))}function h(e){return f(e)||j(e)}a(h,"isPrimitive",f),a(h,"isObject",j);var S=Number.POSITIVE_INFINITY,O=m.NEGATIVE_INFINITY,T=Math.floor;function w(e){return e<S&&e>O&&T(t=e)===t;var t}function I(e){return f(e)&&w(e)}function N(e){return j(e)&&w(e.valueOf())}function P(e){return I(e)||N(e)}return a(P,"isPrimitive",I),a(P,"isObject",N),function(e){return I(e)&&e>=0&&e<=9007199254740991}},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).isTypedArrayLength=t();
//# sourceMappingURL=browser.js.map