mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
3.1 KiB
JSON
1 line
3.1 KiB
JSON
{"ast":null,"code":"function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true; // Otherwise, if either of them == null they are not equal.\n\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {\n return valueEqual(item, b[index]);\n });\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n return Object.keys(Object.assign({}, a, b)).every(function (key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;","map":{"version":3,"sources":["/app/node_modules/value-equal/esm/value-equal.js"],"names":["valueOf","obj","Object","prototype","call","valueEqual","a","b","Array","isArray","length","every","item","index","aValue","bValue","keys","assign","key"],"mappings":"AAAA,SAASA,OAAT,CAAiBC,GAAjB,EAAsB;AACpB,SAAOA,GAAG,CAACD,OAAJ,GAAcC,GAAG,CAACD,OAAJ,EAAd,GAA8BE,MAAM,CAACC,SAAP,CAAiBH,OAAjB,CAAyBI,IAAzB,CAA8BH,GAA9B,CAArC;AACD;;AAED,SAASI,UAAT,CAAoBC,CAApB,EAAuBC,CAAvB,EAA0B;AACxB;AACA,MAAID,CAAC,KAAKC,CAAV,EAAa,OAAO,IAAP,CAFW,CAIxB;;AACA,MAAID,CAAC,IAAI,IAAL,IAAaC,CAAC,IAAI,IAAtB,EAA4B,OAAO,KAAP;;AAE5B,MAAIC,KAAK,CAACC,OAAN,CAAcH,CAAd,CAAJ,EAAsB;AACpB,WACEE,KAAK,CAACC,OAAN,CAAcF,CAAd,KACAD,CAAC,CAACI,MAAF,KAAaH,CAAC,CAACG,MADf,IAEAJ,CAAC,CAACK,KAAF,CAAQ,UAASC,IAAT,EAAeC,KAAf,EAAsB;AAC5B,aAAOR,UAAU,CAACO,IAAD,EAAOL,CAAC,CAACM,KAAD,CAAR,CAAjB;AACD,KAFD,CAHF;AAOD;;AAED,MAAI,OAAOP,CAAP,KAAa,QAAb,IAAyB,OAAOC,CAAP,KAAa,QAA1C,EAAoD;AAClD,QAAIO,MAAM,GAAGd,OAAO,CAACM,CAAD,CAApB;AACA,QAAIS,MAAM,GAAGf,OAAO,CAACO,CAAD,CAApB;AAEA,QAAIO,MAAM,KAAKR,CAAX,IAAgBS,MAAM,KAAKR,CAA/B,EAAkC,OAAOF,UAAU,CAACS,MAAD,EAASC,MAAT,CAAjB;AAElC,WAAOb,MAAM,CAACc,IAAP,CAAYd,MAAM,CAACe,MAAP,CAAc,EAAd,EAAkBX,CAAlB,EAAqBC,CAArB,CAAZ,EAAqCI,KAArC,CAA2C,UAASO,GAAT,EAAc;AAC9D,aAAOb,UAAU,CAACC,CAAC,CAACY,GAAD,CAAF,EAASX,CAAC,CAACW,GAAD,CAAV,CAAjB;AACD,KAFM,CAAP;AAGD;;AAED,SAAO,KAAP;AACD;;AAED,eAAeb,UAAf","sourcesContent":["function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return (\n Array.isArray(b) &&\n a.length === b.length &&\n a.every(function(item, index) {\n return valueEqual(item, b[index]);\n })\n );\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n return Object.keys(Object.assign({}, a, b)).every(function(key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n"]},"metadata":{},"sourceType":"module"} |