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

@twreporter/redux

Package Overview
Dependencies
Maintainers
4
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twreporter/redux - npm Package Compare versions

Comparing version 5.0.0-beta.10 to 5.0.0-beta.11

1

lib/constants/action-types.js

@@ -47,2 +47,3 @@ "use strict";

FETCH_AUTHOR_COLLECTION_SUCCESS: 'FETCH_AUTHOR_COLLECTION_SUCCESS',
SET_NEXT_POPUP_TIME_STAMP: 'SET_NEXT_POPUP_TIME_STAMP',
singleBookmark: {

@@ -49,0 +50,0 @@ read: {

10

lib/store/create-store.js

@@ -20,3 +20,3 @@ "use strict";

var _throttle = _interopRequireDefault(require("lodash/throttle"));
var _debounce = _interopRequireDefault(require("lodash/debounce"));

@@ -32,3 +32,3 @@ var _reduxThunk = _interopRequireDefault(require("redux-thunk"));

var _ = {
throttle: _throttle["default"]
debounce: _debounce["default"]
};

@@ -87,5 +87,3 @@

module.hot.accept('../reducers', function () {
var nextRootReducer = require('../reducers')["default"];
_store.replaceReducer(nextRootReducer);
_store.replaceReducer(require('../reducers')["default"]);
});

@@ -96,3 +94,3 @@ }

_browserStorage["default"].syncReduxState(_store.getState());
}, 1000));
}, 3000));

@@ -99,0 +97,0 @@ return _context.abrupt("return", _store);

@@ -69,3 +69,3 @@ "use strict";

case 8:
return _context.abrupt("return", now >= expires);
return _context.abrupt("return", now > expires);

@@ -171,5 +171,7 @@ case 9:

var maxAge,
cacheableNewState,
isCacheExpired,
cachedState,
cacheFirstState,
nextReduxState,
toCacheState,
oldCachedState,
_args4 = arguments;

@@ -181,30 +183,21 @@ return regeneratorRuntime.wrap(function _callee4$(_context4) {

maxAge = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : 600;
cacheableNewState = _.pick(newReduxState, cacheableProps);
_context4.next = 4;
_context4.next = 3;
return isReduxStateExpired();
case 4:
if (!_context4.sent) {
_context4.next = 8;
break;
}
toCacheState = cacheableNewState;
_context4.next = 12;
break;
case 8:
_context4.next = 10;
case 3:
isCacheExpired = _context4.sent;
_context4.next = 6;
return getStateFromStorage();
case 10:
oldCachedState = _context4.sent;
toCacheState = _.merge({}, cacheableNewState, _.pick(oldCachedState, cachedFirstProps));
case 6:
cachedState = _context4.sent;
cacheFirstState = _.pick(cachedState, cachedFirstProps);
nextReduxState = _.merge({}, isCacheExpired ? null : cachedState, newReduxState, cacheFirstState);
toCacheState = _.pick(nextReduxState, cacheableProps);
setReduxState(toCacheState).then(function () {
return setReduxStateExpires(maxAge);
});
return _context4.abrupt("return", nextReduxState);
case 12:
setReduxState(toCacheState);
setReduxStateExpires(maxAge);
return _context4.abrupt("return", newReduxState);
case 15:
case "end":

@@ -211,0 +204,0 @@ return _context4.stop();

{
"name": "@twreporter/redux",
"version": "5.0.0-beta.10",
"version": "5.0.0-beta.11",
"description": "redux actions and reducers for twreporter website",

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

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