mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
5.7 KiB
JSON
1 line
5.7 KiB
JSON
{"ast":null,"code":"'use strict';\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\n\nmodule.exports = function hasSymbols() {\n if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') {\n return false;\n }\n\n if (typeof Symbol.iterator === 'symbol') {\n return true;\n }\n\n var obj = {};\n var sym = Symbol('test');\n var symObj = Object(sym);\n\n if (typeof sym === 'string') {\n return false;\n }\n\n if (Object.prototype.toString.call(sym) !== '[object Symbol]') {\n return false;\n }\n\n if (Object.prototype.toString.call(symObj) !== '[object Symbol]') {\n return false;\n } // temp disabled per https://github.com/ljharb/object.assign/issues/17\n // if (sym instanceof Symbol) { return false; }\n // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n // if (!(symObj instanceof Symbol)) { return false; }\n // if (typeof Symbol.prototype.toString !== 'function') { return false; }\n // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\n var symVal = 42;\n obj[sym] = symVal;\n\n for (sym in obj) {\n return false;\n } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\n\n if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) {\n return false;\n }\n\n if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) {\n return false;\n }\n\n var syms = Object.getOwnPropertySymbols(obj);\n\n if (syms.length !== 1 || syms[0] !== sym) {\n return false;\n }\n\n if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {\n return false;\n }\n\n if (typeof Object.getOwnPropertyDescriptor === 'function') {\n var descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\n if (descriptor.value !== symVal || descriptor.enumerable !== true) {\n return false;\n }\n }\n\n return true;\n};","map":{"version":3,"sources":["/app/node_modules/has-symbols/shams.js"],"names":["module","exports","hasSymbols","Symbol","Object","getOwnPropertySymbols","iterator","obj","sym","symObj","prototype","toString","call","symVal","keys","length","getOwnPropertyNames","syms","propertyIsEnumerable","getOwnPropertyDescriptor","descriptor","value","enumerable"],"mappings":"AAAA;AAEA;;AACAA,MAAM,CAACC,OAAP,GAAiB,SAASC,UAAT,GAAsB;AACtC,MAAI,OAAOC,MAAP,KAAkB,UAAlB,IAAgC,OAAOC,MAAM,CAACC,qBAAd,KAAwC,UAA5E,EAAwF;AAAE,WAAO,KAAP;AAAe;;AACzG,MAAI,OAAOF,MAAM,CAACG,QAAd,KAA2B,QAA/B,EAAyC;AAAE,WAAO,IAAP;AAAc;;AAEzD,MAAIC,GAAG,GAAG,EAAV;AACA,MAAIC,GAAG,GAAGL,MAAM,CAAC,MAAD,CAAhB;AACA,MAAIM,MAAM,GAAGL,MAAM,CAACI,GAAD,CAAnB;;AACA,MAAI,OAAOA,GAAP,KAAe,QAAnB,EAA6B;AAAE,WAAO,KAAP;AAAe;;AAE9C,MAAIJ,MAAM,CAACM,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BJ,GAA/B,MAAwC,iBAA5C,EAA+D;AAAE,WAAO,KAAP;AAAe;;AAChF,MAAIJ,MAAM,CAACM,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BH,MAA/B,MAA2C,iBAA/C,EAAkE;AAAE,WAAO,KAAP;AAAe,GAV7C,CAYtC;AACA;AACA;AACA;AAEA;AACA;;;AAEA,MAAII,MAAM,GAAG,EAAb;AACAN,EAAAA,GAAG,CAACC,GAAD,CAAH,GAAWK,MAAX;;AACA,OAAKL,GAAL,IAAYD,GAAZ,EAAiB;AAAE,WAAO,KAAP;AAAe,GAtBI,CAsBH;;;AACnC,MAAI,OAAOH,MAAM,CAACU,IAAd,KAAuB,UAAvB,IAAqCV,MAAM,CAACU,IAAP,CAAYP,GAAZ,EAAiBQ,MAAjB,KAA4B,CAArE,EAAwE;AAAE,WAAO,KAAP;AAAe;;AAEzF,MAAI,OAAOX,MAAM,CAACY,mBAAd,KAAsC,UAAtC,IAAoDZ,MAAM,CAACY,mBAAP,CAA2BT,GAA3B,EAAgCQ,MAAhC,KAA2C,CAAnG,EAAsG;AAAE,WAAO,KAAP;AAAe;;AAEvH,MAAIE,IAAI,GAAGb,MAAM,CAACC,qBAAP,CAA6BE,GAA7B,CAAX;;AACA,MAAIU,IAAI,CAACF,MAAL,KAAgB,CAAhB,IAAqBE,IAAI,CAAC,CAAD,CAAJ,KAAYT,GAArC,EAA0C;AAAE,WAAO,KAAP;AAAe;;AAE3D,MAAI,CAACJ,MAAM,CAACM,SAAP,CAAiBQ,oBAAjB,CAAsCN,IAAtC,CAA2CL,GAA3C,EAAgDC,GAAhD,CAAL,EAA2D;AAAE,WAAO,KAAP;AAAe;;AAE5E,MAAI,OAAOJ,MAAM,CAACe,wBAAd,KAA2C,UAA/C,EAA2D;AAC1D,QAAIC,UAAU,GAAGhB,MAAM,CAACe,wBAAP,CAAgCZ,GAAhC,EAAqCC,GAArC,CAAjB;;AACA,QAAIY,UAAU,CAACC,KAAX,KAAqBR,MAArB,IAA+BO,UAAU,CAACE,UAAX,KAA0B,IAA7D,EAAmE;AAAE,aAAO,KAAP;AAAe;AACpF;;AAED,SAAO,IAAP;AACA,CAtCD","sourcesContent":["'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n"]},"metadata":{},"sourceType":"script"} |