mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
4.7 KiB
JSON
1 line
4.7 KiB
JSON
|
{"ast":null,"code":"'use strict';\n\nvar callBound = require('call-bind/callBound');\n\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n has = callBound('Object.prototype.hasOwnProperty');\n $exec = callBound('RegExp.prototype.exec');\n isRegexMarker = {};\n\n var throwRegexMarker = function () {\n throw isRegexMarker;\n };\n\n badStringifier = {\n toString: throwRegexMarker,\n valueOf: throwRegexMarker\n };\n\n if (typeof Symbol.toPrimitive === 'symbol') {\n badStringifier[Symbol.toPrimitive] = throwRegexMarker;\n }\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\nmodule.exports = hasToStringTag // eslint-disable-next-line consistent-return\n? function isRegex(value) {\n if (!value || typeof value !== 'object') {\n return false;\n }\n\n var descriptor = gOPD(value, 'lastIndex');\n var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\n if (!hasLastIndexDataProperty) {\n return false;\n }\n\n try {\n $exec(value, badStringifier);\n } catch (e) {\n return e === isRegexMarker;\n }\n} : function isRegex(value) {\n // In older browsers, typeof regex incorrectly returns 'function'\n if (!value || typeof value !== 'object' && typeof value !== 'function') {\n return false;\n }\n\n return $toString(value) === regexClass;\n};","map":{"version":3,"sources":["/app/node_modules/is-regex/index.js"],"names":["callBound","require","hasToStringTag","has","$exec","isRegexMarker","badStringifier","throwRegexMarker","toString","valueOf","Symbol","toPrimitive","$toString","gOPD","Object","getOwnPropertyDescriptor","regexClass","module","exports","isRegex","value","descriptor","hasLastIndexDataProperty","e"],"mappings":"AAAA;;AAEA,IAAIA,SAAS,GAAGC,OAAO,CAAC,qBAAD,CAAvB;;AACA,IAAIC,cAAc,GAAGD,OAAO,CAAC,uBAAD,CAAP,EAAr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mB5B,SAASc,OAAT,CAAiBC,KAAjB,EAAwB;AACzB;AACA,MAAI,CAACA,KAAD,IAAW,OAAOA,KAAP,KAAiB,QAAjB,IAA6B,OAAOA,KAAP,KAAiB,UAA7D,EAA0E;AACzE,WAAO,KAAP;AACA;;AAED,SAAOR,SAAS,CAACQ,KAAD,CAAT,KAAqBJ,UAA5B;AACA,CA1BF","sourcesContent":["'use strict';\n\nvar callBound = require('call-bind/callBound');\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar has;\nvar $exec;\nvar isRegexMarker;\nvar badStringifier;\n\nif (hasToStringTag) {\n\thas = callBound('Object.prototype.hasOwnProperty');\n\t$exec = callBound('RegExp.prototype.exec');\n\tisRegexMarker = {};\n\n\tvar throwRegexMarker = function () {\n\t\tthrow isRegexMarker;\n\t};\n\tbadStringifier = {\n\t\ttoString: throwRegexMarker,\n\t\tvalueOf: throwRegexMarker\n\t};\n\n\tif (typeof Symbol.toPrimitive === 'symbol') {\n\t\tbadStringifier[Symbol.toPrimitive] = throwRegexMarker;\n\t}\n}\n\nvar $toString = callBound('Object.prototype.toString');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar regexClass = '[object RegExp]';\n\nmodule.exports = hasToStringTag\n\t// eslint-disable-next-line
|