Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-persist

Package Overview
Dependencies
Maintainers
2
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-persist - npm Package Compare versions

Comparing version 5.7.0 to 5.7.1

7

dist/redux-persist.js

@@ -324,3 +324,7 @@ (function (global, factory) {

// only rehydrate if we are not already sealed
!_sealed && action.rehydrate(config.key, payload, err);
if (!_sealed) {
action.rehydrate(config.key, payload, err);
_sealed = true;
}
if ("development" !== 'production' && _sealed) console.error('redux-persist: rehydrate for "' + config.key + '" called after timeout.', payload, err);

@@ -330,3 +334,2 @@ };

!_sealed && _rehydrate(undefined, new Error('redux-persist: persist timed out for persist key "' + config.key + '"'));
_sealed = true;
}, timeout);

@@ -333,0 +336,0 @@

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.ReduxPersist={})}(this,function(e){"use strict";var t="persist:",r="persist/FLUSH",n="persist/REHYDRATE",o="persist/PAUSE",i="persist/PERSIST",u="persist/PURGE",s="persist/REGISTER",c=-1,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},l=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}return Array.from(e)};function p(e,t,r,n){var o=f({},r);return e&&"object"===(void 0===e?"undefined":a(e))&&Object.keys(e).forEach(function(n){"_persist"!==n&&t[n]===r[n]&&(o[n]=e[n])}),o}function y(e){var r=e.blacklist||null,n=e.whitelist||null,o=e.transforms||[],i=e.throttle||0,u=""+(void 0!==e.keyPrefix?e.keyPrefix:t)+e.key,s=e.storage,c=!1===e.serialize?function(e){return e}:v,a={},f={},d=[],l=null,p=null;function y(){if(0===d.length)return l&&clearInterval(l),void(l=null);var e=d.shift(),t=o.reduce(function(t,r){return r.in(t,e,a)},a[e]);void 0!==t&&function(e,t){try{f[e]=c(t)}catch(e){console.error("redux-persist/createPersistoid: error serializing state",e)}0===d.length&&(Object.keys(f).forEach(function(e){void 0===a[e]&&delete f[e]}),p=s.setItem(u,c(f)).catch(h))}(e,t)}function h(e){0}return{update:function(e){Object.keys(e).forEach(function(t){(function(e){return!(n&&-1===n.indexOf(e)&&"_persist"!==e||r&&-1!==r.indexOf(e))})(t)&&a[t]!==e[t]&&-1===d.indexOf(t)&&d.push(t)}),null===l&&(l=setInterval(y,i)),a=e},flush:function(){for(;0!==d.length;)y();return p||Promise.resolve()}}}function v(e){return JSON.stringify(e)}function h(e){var r=e.transforms||[],n=!1===e.serialize?function(e){return e}:b;return e.storage.getItem(""+(void 0!==e.keyPrefix?e.keyPrefix:t)+e.key).then(function(e){if(e)try{var t={},o=n(e);return Object.keys(o).forEach(function(e){t[e]=r.reduceRight(function(t,r){return r.out(t,e,o)},n(o[e]))}),t}catch(e){throw e}})}function b(e){return JSON.parse(e)}function g(e){return e.storage.removeItem(""+(void 0!==e.keyPrefix?e.keyPrefix:t)+e.key,m)}function m(e){0}var E=5e3;function O(e,t){var s=void 0!==e.version?e.version:c,a=void 0===e.stateReconciler?p:e.stateReconciler,l=e.getStoredState||h,v=void 0!==e.timeout?e.timeout:E,b=null,m=!1,O=!0,j=function(e){return e._persist.rehydrated&&b&&!O&&b.update(e),e};return function(c,p){var h=c||{},E=h._persist,S=d(h,["_persist"]);if(p.type===i){var w=!1,x=function(t,r){!w&&p.rehydrate(e.key,t,r)};if(v&&setTimeout(function(){!w&&x(void 0,Error('redux-persist: persist timed out for persist key "'+e.key+'"')),w=!0},v),O=!1,b||(b=y(e)),E)return c;if("function"!=typeof p.rehydrate||"function"!=typeof p.register)throw Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),l(e).then(function(t){(e.migrate||function(e,t){return Promise.resolve(e)})(t,s).then(function(e){x(e)},function(e){x(void 0,e)})},function(e){x(void 0,e)}),f({},t(S,p),{_persist:{version:s,rehydrated:!1}})}if(p.type===u)return m=!0,p.result(g(e)),f({},t(S,p),{_persist:E});if(p.type===r)return p.result(b&&b.flush()),f({},t(S,p),{_persist:E});if(p.type===o)O=!0;else if(p.type===n){if(m)return f({},S,{_persist:f({},E,{rehydrated:!0})});if(p.key===e.key){var P=t(S,p),k=p.payload,I=!1!==a&&void 0!==k?a(k,c,P,e):P,R=f({},I,{_persist:f({},E,{rehydrated:!0})});return j(R)}}if(!E)return t(c,p);var T=t(S,p);return T===S?c:(T._persist=E,j(T))}}var j="object"==typeof global&&global&&global.Object===Object&&global,S="object"==typeof self&&self&&self.Object===Object&&self,w=(j||S||Function("return this")()).Symbol,x=Object.prototype,P=x.hasOwnProperty,k=x.toString,I=w?w.toStringTag:void 0;var R=Object.prototype.toString;var T="[object Null]",_="[object Undefined]",A=w?w.toStringTag:void 0;function N(e){return null==e?void 0===e?_:T:A&&A in Object(e)?function(e){var t=P.call(e,I),r=e[I];try{e[I]=void 0;var n=!0}catch(e){}var o=k.call(e);return n&&(t?e[I]=r:delete e[I]),o}(e):function(e){return R.call(e)}(e)}var U,F,G=(U=Object.getPrototypeOf,F=Object,function(e){return U(F(e))});var H="[object Object]",z=Function.prototype.toString,D=Object.prototype.hasOwnProperty,L=z.call(Object);var M=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),Y={INIT:"@@redux/INIT"};function C(e,t,r){var n;if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error("Expected the enhancer to be a function.");return r(C)(e,t)}if("function"!=typeof e)throw Error("Expected the reducer to be a function.");var o=e,i=t,u=[],s=u,c=!1;function a(){s===u&&(s=u.slice())}function f(){return i}function d(e){if("function"!=typeof e)throw Error("Expected listener to be a function.");var t=!0;return a(),s.push(e),function(){if(t){t=!1,a();var r=s.indexOf(e);s.splice(r,1)}}}function l(e){if(!function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||N(e)!=H)return!1;var t=G(e);if(null===t)return!0;var r=D.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&z.call(r)==L}(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw Error("Reducers may not dispatch actions.");try{c=!0,i=o(i,e)}finally{c=!1}for(var t=u=s,r=0;t.length>r;r++){(0,t[r])()}return e}return l({type:Y.INIT}),(n={dispatch:l,subscribe:d,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");o=e,l({type:Y.INIT})}})[M]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(f())}return r(),{unsubscribe:t(r)}}})[M]=function(){return this},e},n}function J(e,t){var r=t&&t.type;return"Given action "+(r&&'"'+r+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function K(e){for(var t=Object.keys(e),r={},n=0;t.length>n;n++){var o=t[n];"function"==typeof e[o]&&(r[o]=e[o])}var i=Object.keys(r),u=void 0;try{!function(e){Object.keys(e).forEach(function(t){var r=e[t];if(void 0===r(void 0,{type:Y.INIT}))throw Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+Y.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(r)}catch(e){u=e}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(u)throw u;for(var n=!1,o={},s=0;i.length>s;s++){var c=i[s],a=e[c],f=(0,r[c])(a,t);if(void 0===f){var d=J(c,t);throw Error(d)}o[c]=f,n=n||f!==a}return n?o:e}}function B(e,t,r,n){var o=f({},r);return e&&"object"===(void 0===e?"undefined":a(e))&&Object.keys(e).forEach(function(n){var i;"_persist"!==n&&(t[n]===r[n]&&(o[n]=null===(i=r[n])||Array.isArray(i)||"object"!==(void 0===i?"undefined":a(i))?e[n]:f({},o[n],e[n])))}),o}var V={registry:[],bootstrapped:!1},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,t=arguments[1];switch(t.type){case s:return f({},e,{registry:[].concat(l(e.registry),[t.key])});case n:var r=e.registry.indexOf(t.key),o=[].concat(l(e.registry));return o.splice(r,1),f({},e,{registry:o,bootstrapped:0===o.length});default:return e}};e.persistReducer=O,e.persistCombineReducers=function(e,t){return e.stateReconciler=void 0===e.stateReconciler?B:e.stateReconciler,O(e,K(t))},e.persistStore=function(e,t,c){var a=c||!1,d=C(W,V,t?t.enhancer:void 0),l=function(e){d.dispatch({type:s,key:e})},p=function(t,r,o){var i={type:n,payload:r,err:o,key:t};e.dispatch(i),d.dispatch(i),a&&y.getState().bootstrapped&&(a(),a=!1)},y=f({},d,{purge:function(){var t=[];return e.dispatch({type:u,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:r,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:o})},persist:function(){e.dispatch({type:i,register:l,rehydrate:p})}});return y.persist(),y},e.createMigrate=function(e,t){return function(t,r){if(!t)return Promise.resolve(void 0);var n=t._persist&&void 0!==t._persist.version?t._persist.version:c;if(n===r)return Promise.resolve(t);if(n>r)return Promise.resolve(t);var o=Object.keys(e).map(function(e){return parseInt(e)}).filter(function(e){return r>=e&&e>n}).sort(function(e,t){return e-t});try{var i=o.reduce(function(t,r){return e[r](t)},t);return Promise.resolve(i)}catch(e){return Promise.reject(e)}}},e.createTransform=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.whitelist||null,o=r.blacklist||null;function i(e){return!(!n||-1!==n.indexOf(e))||!(!o||-1===o.indexOf(e))}return{in:function(t,r,n){return!i(r)&&e?e(t,r,n):t},out:function(e,r,n){return!i(r)&&t?t(e,r,n):e}}},e.getStoredState=h,e.createPersistoid=y,e.purgeStoredState=g,e.KEY_PREFIX=t,e.FLUSH=r,e.REHYDRATE=n,e.PAUSE=o,e.PERSIST=i,e.PURGE=u,e.REGISTER=s,e.DEFAULT_VERSION=c,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.ReduxPersist={})}(this,function(e){"use strict";var t="persist:",r="persist/FLUSH",n="persist/REHYDRATE",o="persist/PAUSE",i="persist/PERSIST",u="persist/PURGE",s="persist/REGISTER",c=-1,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},l=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);e.length>t;t++)r[t]=e[t];return r}return Array.from(e)};function p(e,t,r,n){var o=f({},r);return e&&"object"===(void 0===e?"undefined":a(e))&&Object.keys(e).forEach(function(n){"_persist"!==n&&t[n]===r[n]&&(o[n]=e[n])}),o}function y(e){var r=e.blacklist||null,n=e.whitelist||null,o=e.transforms||[],i=e.throttle||0,u=""+(void 0!==e.keyPrefix?e.keyPrefix:t)+e.key,s=e.storage,c=!1===e.serialize?function(e){return e}:v,a={},f={},d=[],l=null,p=null;function y(){if(0===d.length)return l&&clearInterval(l),void(l=null);var e=d.shift(),t=o.reduce(function(t,r){return r.in(t,e,a)},a[e]);void 0!==t&&function(e,t){try{f[e]=c(t)}catch(e){console.error("redux-persist/createPersistoid: error serializing state",e)}0===d.length&&(Object.keys(f).forEach(function(e){void 0===a[e]&&delete f[e]}),p=s.setItem(u,c(f)).catch(h))}(e,t)}function h(e){0}return{update:function(e){Object.keys(e).forEach(function(t){(function(e){return!(n&&-1===n.indexOf(e)&&"_persist"!==e||r&&-1!==r.indexOf(e))})(t)&&a[t]!==e[t]&&-1===d.indexOf(t)&&d.push(t)}),null===l&&(l=setInterval(y,i)),a=e},flush:function(){for(;0!==d.length;)y();return p||Promise.resolve()}}}function v(e){return JSON.stringify(e)}function h(e){var r=e.transforms||[],n=!1===e.serialize?function(e){return e}:b;return e.storage.getItem(""+(void 0!==e.keyPrefix?e.keyPrefix:t)+e.key).then(function(e){if(e)try{var t={},o=n(e);return Object.keys(o).forEach(function(e){t[e]=r.reduceRight(function(t,r){return r.out(t,e,o)},n(o[e]))}),t}catch(e){throw e}})}function b(e){return JSON.parse(e)}function g(e){return e.storage.removeItem(""+(void 0!==e.keyPrefix?e.keyPrefix:t)+e.key,m)}function m(e){0}var E=5e3;function O(e,t){var s=void 0!==e.version?e.version:c,a=void 0===e.stateReconciler?p:e.stateReconciler,l=e.getStoredState||h,v=void 0!==e.timeout?e.timeout:E,b=null,m=!1,O=!0,j=function(e){return e._persist.rehydrated&&b&&!O&&b.update(e),e};return function(c,p){var h=c||{},E=h._persist,S=d(h,["_persist"]);if(p.type===i){var w=!1,x=function(t,r){w||(p.rehydrate(e.key,t,r),w=!0)};if(v&&setTimeout(function(){!w&&x(void 0,Error('redux-persist: persist timed out for persist key "'+e.key+'"'))},v),O=!1,b||(b=y(e)),E)return c;if("function"!=typeof p.rehydrate||"function"!=typeof p.register)throw Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return p.register(e.key),l(e).then(function(t){(e.migrate||function(e,t){return Promise.resolve(e)})(t,s).then(function(e){x(e)},function(e){x(void 0,e)})},function(e){x(void 0,e)}),f({},t(S,p),{_persist:{version:s,rehydrated:!1}})}if(p.type===u)return m=!0,p.result(g(e)),f({},t(S,p),{_persist:E});if(p.type===r)return p.result(b&&b.flush()),f({},t(S,p),{_persist:E});if(p.type===o)O=!0;else if(p.type===n){if(m)return f({},S,{_persist:f({},E,{rehydrated:!0})});if(p.key===e.key){var P=t(S,p),k=p.payload,I=!1!==a&&void 0!==k?a(k,c,P,e):P,R=f({},I,{_persist:f({},E,{rehydrated:!0})});return j(R)}}if(!E)return t(c,p);var T=t(S,p);return T===S?c:(T._persist=E,j(T))}}var j="object"==typeof global&&global&&global.Object===Object&&global,S="object"==typeof self&&self&&self.Object===Object&&self,w=(j||S||Function("return this")()).Symbol,x=Object.prototype,P=x.hasOwnProperty,k=x.toString,I=w?w.toStringTag:void 0;var R=Object.prototype.toString;var T="[object Null]",_="[object Undefined]",A=w?w.toStringTag:void 0;function N(e){return null==e?void 0===e?_:T:A&&A in Object(e)?function(e){var t=P.call(e,I),r=e[I];try{e[I]=void 0;var n=!0}catch(e){}var o=k.call(e);return n&&(t?e[I]=r:delete e[I]),o}(e):function(e){return R.call(e)}(e)}var U,F,G=(U=Object.getPrototypeOf,F=Object,function(e){return U(F(e))});var H="[object Object]",z=Function.prototype.toString,D=Object.prototype.hasOwnProperty,L=z.call(Object);var M=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof module?module:Function("return this")()),Y={INIT:"@@redux/INIT"};function C(e,t,r){var n;if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error("Expected the enhancer to be a function.");return r(C)(e,t)}if("function"!=typeof e)throw Error("Expected the reducer to be a function.");var o=e,i=t,u=[],s=u,c=!1;function a(){s===u&&(s=u.slice())}function f(){return i}function d(e){if("function"!=typeof e)throw Error("Expected listener to be a function.");var t=!0;return a(),s.push(e),function(){if(t){t=!1,a();var r=s.indexOf(e);s.splice(r,1)}}}function l(e){if(!function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||N(e)!=H)return!1;var t=G(e);if(null===t)return!0;var r=D.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&z.call(r)==L}(e))throw Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(c)throw Error("Reducers may not dispatch actions.");try{c=!0,i=o(i,e)}finally{c=!1}for(var t=u=s,r=0;t.length>r;r++){(0,t[r])()}return e}return l({type:Y.INIT}),(n={dispatch:l,subscribe:d,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw Error("Expected the nextReducer to be a function.");o=e,l({type:Y.INIT})}})[M]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");function r(){e.next&&e.next(f())}return r(),{unsubscribe:t(r)}}})[M]=function(){return this},e},n}function J(e,t){var r=t&&t.type;return"Given action "+(r&&'"'+r+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function K(e){for(var t=Object.keys(e),r={},n=0;t.length>n;n++){var o=t[n];"function"==typeof e[o]&&(r[o]=e[o])}var i=Object.keys(r),u=void 0;try{!function(e){Object.keys(e).forEach(function(t){var r=e[t];if(void 0===r(void 0,{type:Y.INIT}))throw Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===r(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+Y.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(r)}catch(e){u=e}return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(u)throw u;for(var n=!1,o={},s=0;i.length>s;s++){var c=i[s],a=e[c],f=(0,r[c])(a,t);if(void 0===f){var d=J(c,t);throw Error(d)}o[c]=f,n=n||f!==a}return n?o:e}}function B(e,t,r,n){var o=f({},r);return e&&"object"===(void 0===e?"undefined":a(e))&&Object.keys(e).forEach(function(n){var i;"_persist"!==n&&(t[n]===r[n]&&(o[n]=null===(i=r[n])||Array.isArray(i)||"object"!==(void 0===i?"undefined":a(i))?e[n]:f({},o[n],e[n])))}),o}var V={registry:[],bootstrapped:!1},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,t=arguments[1];switch(t.type){case s:return f({},e,{registry:[].concat(l(e.registry),[t.key])});case n:var r=e.registry.indexOf(t.key),o=[].concat(l(e.registry));return o.splice(r,1),f({},e,{registry:o,bootstrapped:0===o.length});default:return e}};e.persistReducer=O,e.persistCombineReducers=function(e,t){return e.stateReconciler=void 0===e.stateReconciler?B:e.stateReconciler,O(e,K(t))},e.persistStore=function(e,t,c){var a=c||!1,d=C(W,V,t?t.enhancer:void 0),l=function(e){d.dispatch({type:s,key:e})},p=function(t,r,o){var i={type:n,payload:r,err:o,key:t};e.dispatch(i),d.dispatch(i),a&&y.getState().bootstrapped&&(a(),a=!1)},y=f({},d,{purge:function(){var t=[];return e.dispatch({type:u,result:function(e){t.push(e)}}),Promise.all(t)},flush:function(){var t=[];return e.dispatch({type:r,result:function(e){t.push(e)}}),Promise.all(t)},pause:function(){e.dispatch({type:o})},persist:function(){e.dispatch({type:i,register:l,rehydrate:p})}});return y.persist(),y},e.createMigrate=function(e,t){return function(t,r){if(!t)return Promise.resolve(void 0);var n=t._persist&&void 0!==t._persist.version?t._persist.version:c;if(n===r)return Promise.resolve(t);if(n>r)return Promise.resolve(t);var o=Object.keys(e).map(function(e){return parseInt(e)}).filter(function(e){return r>=e&&e>n}).sort(function(e,t){return e-t});try{var i=o.reduce(function(t,r){return e[r](t)},t);return Promise.resolve(i)}catch(e){return Promise.reject(e)}}},e.createTransform=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.whitelist||null,o=r.blacklist||null;function i(e){return!(!n||-1!==n.indexOf(e))||!(!o||-1===o.indexOf(e))}return{in:function(t,r,n){return!i(r)&&e?e(t,r,n):t},out:function(e,r,n){return!i(r)&&t?t(e,r,n):e}}},e.getStoredState=h,e.createPersistoid=y,e.purgeStoredState=g,e.KEY_PREFIX=t,e.FLUSH=r,e.REHYDRATE=n,e.PAUSE=o,e.PERSIST=i,e.PURGE=u,e.REGISTER=s,e.DEFAULT_VERSION=c,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=redux-persist.min.js.map

@@ -50,3 +50,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

// only rehydrate if we are not already sealed
!_sealed && action.rehydrate(config.key, payload, err);
if (!_sealed) {
action.rehydrate(config.key, payload, err);
_sealed = true;
}
if (process.env.NODE_ENV !== 'production' && _sealed) console.error('redux-persist: rehydrate for "' + config.key + '" called after timeout.', payload, err);

@@ -56,3 +60,2 @@ };

!_sealed && _rehydrate(undefined, new Error('redux-persist: persist timed out for persist key "' + config.key + '"'));
_sealed = true;
}, timeout);

@@ -59,0 +62,0 @@

@@ -69,3 +69,7 @@ 'use strict';

// only rehydrate if we are not already sealed
!_sealed && action.rehydrate(config.key, payload, err);
if (!_sealed) {
action.rehydrate(config.key, payload, err);
_sealed = true;
}
if (process.env.NODE_ENV !== 'production' && _sealed) console.error('redux-persist: rehydrate for "' + config.key + '" called after timeout.', payload, err);

@@ -75,3 +79,2 @@ };

!_sealed && _rehydrate(undefined, new Error('redux-persist: persist timed out for persist key "' + config.key + '"'));
_sealed = true;
}, timeout);

@@ -78,0 +81,0 @@

{
"name": "redux-persist",
"version": "5.7.0",
"version": "5.7.1",
"description": "persist and rehydrate redux stores",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -73,3 +73,7 @@ // @flow

// only rehydrate if we are not already sealed
!_sealed && action.rehydrate(config.key, payload, err)
if (!_sealed) {
action.rehydrate(config.key, payload, err)
_sealed = true
}
if (process.env.NODE_ENV !== 'production' && _sealed)

@@ -95,3 +99,2 @@ console.error(

)
_sealed = true
}, timeout)

@@ -98,0 +101,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc