redux-local-storage
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -7,2 +7,4 @@ 'use strict'; | ||
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; }; | ||
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | ||
@@ -43,2 +45,4 @@ | ||
var cid = action.cid ? { cid: action.cid } : {}; | ||
switch (type) { | ||
@@ -49,7 +53,8 @@ | ||
coerceArray(action.request).map(function (requestAction) { | ||
store.dispatch({ | ||
type: withNamespace(namespace, requestAction), | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, requestAction) | ||
}, cid, { | ||
key: action.key, | ||
value: action.value | ||
}); | ||
})); | ||
}); | ||
@@ -61,6 +66,7 @@ | ||
coerceArray(action.failure).map(function (failureAction) { | ||
store.dispatch({ | ||
type: withNamespace(namespace, failureAction), | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, failureAction) | ||
}, cid, { | ||
err: err | ||
}); | ||
})); | ||
}); | ||
@@ -70,6 +76,7 @@ } | ||
coerceArray(action.success).map(function (successAction) { | ||
store.dispatch({ | ||
type: withNamespace(namespace, successAction), | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, successAction) | ||
}, cid, { | ||
value: value | ||
}); | ||
})); | ||
}); | ||
@@ -81,6 +88,7 @@ }); | ||
coerceArray(action.request).map(function (requestAction) { | ||
store.dispatch({ | ||
type: withNamespace(namespace, requestAction), | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, requestAction) | ||
}, cid, { | ||
key: action.key | ||
}); | ||
})); | ||
}); | ||
@@ -92,6 +100,7 @@ | ||
coerceArray(action.failure).map(function (failureAction) { | ||
store.dispatch({ | ||
type: withNamespace(namespace, failureAction), | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, failureAction) | ||
}, cid, { | ||
err: err | ||
}); | ||
})); | ||
}); | ||
@@ -101,6 +110,7 @@ } | ||
coerceArray(action.success).map(function (successAction) { | ||
store.dispatch({ | ||
type: withNamespace(namespace, successAction), | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, successAction) | ||
}, cid, { | ||
value: value | ||
}); | ||
})); | ||
}); | ||
@@ -112,6 +122,7 @@ }); | ||
coerceArray(action.request).map(function (requestAction) { | ||
store.dispatch({ | ||
type: withNamespace(namespace, requestAction), | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, requestAction) | ||
}, cid, { | ||
key: action.key | ||
}); | ||
})); | ||
}); | ||
@@ -123,6 +134,7 @@ | ||
coerceArray(action.failure).map(function (failureAction) { | ||
store.dispatch({ | ||
type: withNamespace(namespace, failureAction), | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, failureAction) | ||
}, cid, { | ||
err: err | ||
}); | ||
})); | ||
}); | ||
@@ -132,5 +144,5 @@ } | ||
coerceArray(action.success).map(function (successAction) { | ||
store.dispatch({ | ||
store.dispatch(_extends({ | ||
type: withNamespace(namespace, successAction) | ||
}); | ||
}, cid)); | ||
}); | ||
@@ -137,0 +149,0 @@ }); |
{ | ||
"name": "redux-local-storage", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "Redux middleware for accessing local storage", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
@@ -16,2 +16,4 @@ import _ from 'lodash' | ||
const cid = (action.cid) ? { cid: action.cid } : {} | ||
switch (type) { | ||
@@ -24,2 +26,3 @@ | ||
type: withNamespace(namespace, requestAction), | ||
...cid, | ||
key: action.key, | ||
@@ -36,2 +39,3 @@ value: action.value | ||
type: withNamespace(namespace, failureAction), | ||
...cid, | ||
err | ||
@@ -45,2 +49,3 @@ }) | ||
type: withNamespace(namespace, successAction), | ||
...cid, | ||
value | ||
@@ -57,2 +62,3 @@ }) | ||
type: withNamespace(namespace, requestAction), | ||
...cid, | ||
key: action.key | ||
@@ -68,2 +74,3 @@ }) | ||
type: withNamespace(namespace, failureAction), | ||
...cid, | ||
err | ||
@@ -77,2 +84,3 @@ }) | ||
type: withNamespace(namespace, successAction), | ||
...cid, | ||
value | ||
@@ -89,2 +97,3 @@ }) | ||
type: withNamespace(namespace, requestAction), | ||
...cid, | ||
key: action.key | ||
@@ -100,2 +109,3 @@ }) | ||
type: withNamespace(namespace, failureAction), | ||
...cid, | ||
err | ||
@@ -108,3 +118,4 @@ }) | ||
store.dispatch({ | ||
type: withNamespace(namespace, successAction) | ||
type: withNamespace(namespace, successAction), | ||
...cid | ||
}) | ||
@@ -111,0 +122,0 @@ }) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
287000
853
0