Build 545032stable
Module 996671
1,066 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,r=n(476744),s=n(696219),a=n(790669),o=n(704698),l=function(e,t){if(null==e)throw TypeError("Cannot call method on "+e);if("string"!=typeof t||"number"!==t&&"string"!==t)throw TypeError('hint must be "string" or "number"');var n,i,a,o="string"===t?["toString","valueOf"]:["valueOf","toString"];for(a=0;a<o.length;++a)if(s(n=e[o[a]])&&r(i=n.call(e)))return i;throw TypeError("No default value")},u=function(e,t){var n=e[t];if(null!=n){if(!s(n))throw TypeError(n+" returned for property "+String(t)+" of object "+e+" is not a function");return n}};e.exports=function(e){if(r(e))return e;var t,n="default";if(arguments.length>1&&(arguments[1]===String?n="string":arguments[1]===Number&&(n="number")),i&&(Symbol.toPrimitive?t=u(e,Symbol.toPrimitive):o(e)&&(t=Symbol.prototype.valueOf)),void 0!==t){var s=t.call(e,n);if(r(s))return s;throw TypeError("unable to convert exotic object to primitive")}return"default"===n&&(a(e)||o(e))&&(n="string"),l(e,"default"===n?"number":n)}}