mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
1 line
2.0 KiB
JavaScript
1 line
2.0 KiB
JavaScript
(function(e,r){if(typeof define==="function"&&define.amd){define("Reselect",["exports"],r)}else if(typeof exports!=="undefined"){r(exports)}else{var t={exports:{}};r(t.exports);e.Reselect=t.exports}})(this,function(e){"use strict";e.__esModule=true;e.defaultMemoize=r;e.createSelectorCreator=t;e.createStructuredSelector=n;function u(e,r){return e===r}function o(e,r,t){if(r===null||t===null||r.length!==t.length){return false}var n=r.length;for(var u=0;u<n;u++){if(!e(r[u],t[u])){return false}}return true}function r(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:u;var t=null;var n=null;return function(){if(!o(r,t,arguments)){n=e.apply(null,arguments)}t=arguments;return n}}function l(e){var r=Array.isArray(e[0])?e[0]:e;if(!r.every(function(e){return typeof e==="function"})){var t=r.map(function(e){return typeof e}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, "+("instead received the following types: ["+t+"]"))}return r}function t(f){for(var e=arguments.length,i=Array(e>1?e-1:0),r=1;r<e;r++){i[r-1]=arguments[r]}return function(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++){r[t]=arguments[t]}var n=0;var u=r.pop();var o=l(r);var a=f.apply(undefined,[function(){n++;return u.apply(null,arguments)}].concat(i));var c=f(function(){var e=[];var r=o.length;for(var t=0;t<r;t++){e.push(o[t].apply(null,arguments))}return a.apply(null,e)});c.resultFunc=u;c.dependencies=o;c.recomputations=function(){return n};c.resetRecomputations=function(){return n=0};return c}}var a=e.createSelector=t(r);function n(r){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:a;if(typeof r!=="object"){throw new Error("createStructuredSelector expects first argument to be an object "+("where each property is a selector, instead received a "+typeof r))}var n=Object.keys(r);return e(n.map(function(e){return r[e]}),function(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++){r[t]=arguments[t]}return r.reduce(function(e,r,t){e[n[t]]=r;return e},{})})}}); |