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

redux-router-kit

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-router-kit - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

lib/reducer.js

@@ -55,3 +55,3 @@ 'use strict';

state = _extends({}, state, {
previous: state.current,
previous: !_payload.replace && state.current || state.previous,
current: _extends({}, _meta.state, {

@@ -58,0 +58,0 @@ _routeId: _meta._routeId,

{
"name": "redux-router-kit",
"version": "0.0.8",
"version": "0.0.9",
"description": "Routing tools for Redux/React",

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

@@ -42,3 +42,3 @@ import ActionTypes from './ActionTypes';

...state,
previous: state.current,
previous: (!payload.replace && state.current) || state.previous,
current: {

@@ -45,0 +45,0 @@ ...meta.state,

@@ -10,3 +10,5 @@ import test from 'ava';

type: options.type,
payload: {},
payload: {
replace: !!options.replace
},
meta: {

@@ -85,1 +87,20 @@ state: {},

});
test('replace', t => {
let state = reducer();
state = reducer(state, createRouteToAction({
_routeId: 1,
url: '/users'
}));
state = reducer(state, createRouteToAction({
_routeId: 2,
url: '/users/joe'
}));
state = reducer(state, createRouteToAction({
_routeId: 3,
url: '/users/joseph',
replace: true
}));
t.is(state.current.url, '/users/joseph');
t.is(state.previous.url, '/users');
});
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