mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-26 10:25:14 +00:00
1 line
4.4 KiB
JSON
1 line
4.4 KiB
JSON
|
{"ast":null,"code":"var safeIsNaN = Number.isNaN || function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n};\n\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n\n return false;\n}\n\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) {\n isEqual = areInputsEqual;\n }\n\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n\n function memoized() {\n var newArgs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n\n return memoized;\n}\n\nexport default memoizeOne;","map":{"version":3,"sources":["/app/node_modules/memoize-one/dist/memoize-one.esm.js"],"names":["safeIsNaN","Number","isNaN","ponyfill","value","isEqual","first","second","areInputsEqual","newInputs","lastInputs","length","i","memoizeOne","resultFn","lastThis","lastArgs","lastResult","calledOnce","memoized","newArgs","_i","arguments","apply"],"mappings":"AAAA,IAAIA,SAAS,GAAGC,MAAM,CAACC,KAAP,IACZ,SAASC,QAAT,CAAkBC,KAAlB,EAAyB;AACrB,SAAO,OAAOA,KAAP,KAAiB,QAAjB,IAA6BA,KAAK,KAAKA,KAA9C;AACH,CAHL;;AAIA,SAASC,OAAT,CAAiBC,KAAjB,EAAwBC,MAAxB,EAAgC;AAC5B,MAAID,KAAK,KAAKC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AAf,EAAqBH,OAArB,CAAb;AACAF,IAAAA,UAAU,GAAG,IAAb;AACAH,IAAAA,QAAQ,GAAG,IAAX;AACAC,IAAAA,QAAQ,GAAGI,OAAX;AACA,WAAOH,UAAP;AACH;;AACD,SAAOE,QAAP;AACH;;AAED,eAAeN,UAAf","sourcesContent":["var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce &&
|