vuex-persistedstate
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -1,1 +0,1 @@ | ||
function isNonNullObject(e){return!!e&&"object"==typeof e}function isSpecial(e){var r=Object.prototype.toString.call(e);return"[object RegExp]"===r||"[object Date]"===r||isReactElement(e)}function isReactElement(e){return e.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,r){var t=!r||r.clone!==!1;return t&&isMergeableObject(e)?deepmerge(emptyTarget(e),e,r):e}function defaultArrayMerge(e,r,t){return e.concat(r).map(function(e){return cloneUnlessOtherwiseSpecified(e,t)})}function mergeObject(e,r,t){var n={};return isMergeableObject(e)&&Object.keys(e).forEach(function(r){n[r]=cloneUnlessOtherwiseSpecified(e[r],t)}),Object.keys(r).forEach(function(i){isMergeableObject(r[i])&&e[i]?n[i]=deepmerge(e[i],r[i],t):n[i]=cloneUnlessOtherwiseSpecified(r[i],t)}),n}function deepmerge(e,r,t){var n=Array.isArray(r),i=Array.isArray(e),c=t||{arrayMerge:defaultArrayMerge},u=n===i;if(u){if(n){var o=c.arrayMerge||defaultArrayMerge;return o(e,r,t)}return mergeObject(e,r,t)}return cloneUnlessOtherwiseSpecified(r,t)}var isMergeableObject=function(e){return isNonNullObject(e)&&!isSpecial(e)},canUseSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;deepmerge.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,t){return deepmerge(e,t,r)},{})};var deepmerge_1=deepmerge,es=Object.freeze({default:deepmerge_1}),get=function(e,r,t){return void 0===(e=(r.split?r.split("."):r).reduce(function(e,r){return e&&e[r]},e))?t:e},set=function(e,r,t,n){return(r=r.split?r.split("."):r).slice(0,-1).reduce(function(e,r){return e[r]=e[r]||{}},n=e)[r.pop()]=t,e},shvl={get:get,set:set},merge=es&&es.default||es,vuexPersistedstate=function(e,r,t){function n(e){try{return e.setItem("@@",1),e.removeItem("@@"),!0}catch(e){}return!1}function i(e,r,t){try{return(t=r.getItem(e))&&"undefined"!==t?JSON.parse(t):void 0}catch(e){}}function c(){return!0}function u(e,r,t){return t.setItem(e,JSON.stringify(r))}function o(e,r){return 0===r.length?e:r.reduce(function(r,t){return shvl.set(r,t,shvl.get(e,t))},{})}function s(e){return function(r){return e.subscribe(r)}}if(r=e.storage||window&&window.localStorage,t=e.key||"vuex",!n(r))throw new Error("Invalid storage instance given");return function(n){const a=shvl.get(e,"getState",i)(t,r);"object"==typeof a&&null!==a&&n.replaceState(merge(n.state,a)),(e.subscriber||s)(n)(function(n,i){(e.filter||c)(n)&&(e.setState||u)(t,(e.reducer||o)(i,e.paths||[]),r)})}};module.exports=vuexPersistedstate; | ||
function isNonNullObject(e){return!!e&&"object"==typeof e}function isSpecial(e){var r=Object.prototype.toString.call(e);return"[object RegExp]"===r||"[object Date]"===r||isReactElement(e)}function isReactElement(e){return e.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,r){var t=!r||r.clone!==!1;return t&&isMergeableObject(e)?deepmerge(emptyTarget(e),e,r):e}function defaultArrayMerge(e,r,t){return e.concat(r).map(function(e){return cloneUnlessOtherwiseSpecified(e,t)})}function mergeObject(e,r,t){var n={};return isMergeableObject(e)&&Object.keys(e).forEach(function(r){n[r]=cloneUnlessOtherwiseSpecified(e[r],t)}),Object.keys(r).forEach(function(i){isMergeableObject(r[i])&&e[i]?n[i]=deepmerge(e[i],r[i],t):n[i]=cloneUnlessOtherwiseSpecified(r[i],t)}),n}function deepmerge(e,r,t){var n=Array.isArray(r),i=Array.isArray(e),c=t||{arrayMerge:defaultArrayMerge},u=n===i;if(u){if(n){var o=c.arrayMerge||defaultArrayMerge;return o(e,r,t)}return mergeObject(e,r,t)}return cloneUnlessOtherwiseSpecified(r,t)}var isMergeableObject=function(e){return isNonNullObject(e)&&!isSpecial(e)},canUseSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;deepmerge.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,t){return deepmerge(e,t,r)},{})};var deepmerge_1=deepmerge,es=Object.freeze({default:deepmerge_1}),get=function(e,r,t){return void 0===(e=(r.split?r.split("."):r).reduce(function(e,r){return e&&e[r]},e))?t:e},set=function(e,r,t,n){return(r=r.split?r.split("."):r).slice(0,-1).reduce(function(e,r){return e[r]=e[r]||{}},n=e)[r.pop()]=t,e},shvl={get:get,set:set},merge=es&&es.default||es,vuexPersistedstate=function(e,r,t){function n(e){try{return e.setItem("@@",1),e.removeItem("@@"),!0}catch(e){}return!1}function i(e,r,t){try{return(t=r.getItem(e))&&"undefined"!==t?JSON.parse(t):void 0}catch(e){}}function c(){return!0}function u(e,r,t){return t.setItem(e,JSON.stringify(r))}function o(e,r){return 0===r.length?e:r.reduce(function(r,t){return shvl.set(r,t,shvl.get(e,t))},{})}function s(e){return function(r){return e.subscribe(r)}}if(e=e||{},r=e.storage||window&&window.localStorage,t=e.key||"vuex",!n(r))throw new Error("Invalid storage instance given");return function(n){const a=shvl.get(e,"getState",i)(t,r);"object"==typeof a&&null!==a&&n.replaceState(merge(n.state,a)),(e.subscriber||s)(n)(function(n,i){(e.filter||c)(n)&&(e.setState||u)(t,(e.reducer||o)(i,e.paths||[]),r)})}};module.exports=vuexPersistedstate; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.createPersistedState=e()}(this,function(){function t(t){return!!t&&"object"==typeof t}function e(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||r(t)}function r(t){return t.$$typeof===s}function n(t){return Array.isArray(t)?[]:{}}function u(t,e){var r=!e||e.clone!==!1;return r&&f(t)?c(n(t),t,e):t}function o(t,e,r){return t.concat(e).map(function(t){return u(t,r)})}function i(t,e,r){var n={};return f(t)&&Object.keys(t).forEach(function(e){n[e]=u(t[e],r)}),Object.keys(e).forEach(function(o){f(e[o])&&t[o]?n[o]=c(t[o],e[o],r):n[o]=u(e[o],r)}),n}function c(t,e,r){var n=Array.isArray(e),c=Array.isArray(t),f=r||{arrayMerge:o},a=n===c;if(a){if(n){var s=f.arrayMerge||o;return s(t,e,r)}return i(t,e,r)}return u(e,r)}var f=function(r){return t(r)&&!e(r)},a="function"==typeof Symbol&&Symbol.for,s=a?Symbol.for("react.element"):60103;c.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,r){return c(t,r,e)},{})};var y=c,l=Object.freeze({default:y}),d=function(t,e,r){return void 0===(t=(e.split?e.split("."):e).reduce(function(t,e){return t&&t[e]},t))?r:t},p=function(t,e,r,n){return(e=e.split?e.split("."):e).slice(0,-1).reduce(function(t,e){return t[e]=t[e]||{}},n=t)[e.pop()]=r,t},b={get:d,set:p},g=l&&l.default||l,m=function(t,e,r){function n(t){try{return t.setItem("@@",1),t.removeItem("@@"),!0}catch(t){}return!1}function u(t,e,r){try{return(r=e.getItem(t))&&"undefined"!==r?JSON.parse(r):void 0}catch(t){}}function o(){return!0}function i(t,e,r){return r.setItem(t,JSON.stringify(e))}function c(t,e){return 0===e.length?t:e.reduce(function(e,r){return b.set(e,r,b.get(t,r))},{})}function f(t){return function(e){return t.subscribe(e)}}if(e=t.storage||window&&window.localStorage,r=t.key||"vuex",!n(e))throw new Error("Invalid storage instance given");return function(n){const a=b.get(t,"getState",u)(r,e);"object"==typeof a&&null!==a&&n.replaceState(g(n.state,a)),(t.subscriber||f)(n)(function(n,u){(t.filter||o)(n)&&(t.setState||i)(r,(t.reducer||c)(u,t.paths||[]),e)})}};return m}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.createPersistedState=e()}(this,function(){function t(t){return!!t&&"object"==typeof t}function e(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||r(t)}function r(t){return t.$$typeof===s}function n(t){return Array.isArray(t)?[]:{}}function u(t,e){var r=!e||e.clone!==!1;return r&&f(t)?c(n(t),t,e):t}function o(t,e,r){return t.concat(e).map(function(t){return u(t,r)})}function i(t,e,r){var n={};return f(t)&&Object.keys(t).forEach(function(e){n[e]=u(t[e],r)}),Object.keys(e).forEach(function(o){f(e[o])&&t[o]?n[o]=c(t[o],e[o],r):n[o]=u(e[o],r)}),n}function c(t,e,r){var n=Array.isArray(e),c=Array.isArray(t),f=r||{arrayMerge:o},a=n===c;if(a){if(n){var s=f.arrayMerge||o;return s(t,e,r)}return i(t,e,r)}return u(e,r)}var f=function(r){return t(r)&&!e(r)},a="function"==typeof Symbol&&Symbol.for,s=a?Symbol.for("react.element"):60103;c.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,r){return c(t,r,e)},{})};var y=c,l=Object.freeze({default:y}),d=function(t,e,r){return void 0===(t=(e.split?e.split("."):e).reduce(function(t,e){return t&&t[e]},t))?r:t},p=function(t,e,r,n){return(e=e.split?e.split("."):e).slice(0,-1).reduce(function(t,e){return t[e]=t[e]||{}},n=t)[e.pop()]=r,t},b={get:d,set:p},g=l&&l.default||l,m=function(t,e,r){function n(t){try{return t.setItem("@@",1),t.removeItem("@@"),!0}catch(t){}return!1}function u(t,e,r){try{return(r=e.getItem(t))&&"undefined"!==r?JSON.parse(r):void 0}catch(t){}}function o(){return!0}function i(t,e,r){return r.setItem(t,JSON.stringify(e))}function c(t,e){return 0===e.length?t:e.reduce(function(e,r){return b.set(e,r,b.get(t,r))},{})}function f(t){return function(e){return t.subscribe(e)}}if(t=t||{},e=t.storage||window&&window.localStorage,r=t.key||"vuex",!n(e))throw new Error("Invalid storage instance given");return function(n){const a=b.get(t,"getState",u)(r,e);"object"==typeof a&&null!==a&&n.replaceState(g(n.state,a)),(t.subscriber||f)(n)(function(n,u){(t.filter||o)(n)&&(t.setState||i)(r,(t.reducer||c)(u,t.paths||[]),e)})}};return m}); |
{ | ||
"name": "vuex-persistedstate", | ||
"description": "Persist Vuex state with localStorage.", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Robin van der Vleuten <robin@webstronauts.co>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11624
1