Gathering detailed insights and metrics for redux-log-state-diff
Gathering detailed insights and metrics for redux-log-state-diff
Gathering detailed insights and metrics for redux-log-state-diff
Gathering detailed insights and metrics for redux-log-state-diff
redux-log-diff
A simple redux middleware that logs changes to the state after every action.
@taktikorg/unde-animi-omnis
<p align="center"> <a href="https://www.npmjs.com/package/@taktikorg/unde-animi-omnis"><img src="https://img.shields.io/npm/v/@taktikorg/unde-animi-omnis"></a> <a href=""><img src="https://img.shields.io/github/actions/workflow/status/RemiMyrset/@taktikor
@crabas0npm2/dignissimos-ratione-et
security holding package
@crabas0npm2/voluptatum-reiciendis-iure
security holding package
Redux middleware to log actions that change given subsets of state.
npm install redux-log-state-diff
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
21 Commits
1 Watchers
16 Branches
1 Contributors
Updated on Mar 04, 2023
Latest Version
1.0.3
Package Id
redux-log-state-diff@1.0.3
Unpacked Size
17.95 kB
Size
4.27 kB
File Count
10
NPM Version
6.9.0
Node Version
12.3.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
5
Redux middleware to log actions that change given subsets of state
Ever wonder which action resulted in a change to some part of your Redux state?
Introducing a debugging tool that logs a state diff and action type when specified parts of the state change, according to provided state paths or predicate functions.
logStateDiff(pathsAndPredicates, options)
1import logStateDiff from 'redux-log-state-diff' 2 3createStore( 4 reducer, 5 applyMiddleware( 6 logStateDiff([ 7 'subState.path', 8 'otherSubPath.somewhere', 9 (prevState, nextState) => prevState.foo !== nextState.foo 10 ]) 11 ) 12)
Now suppose an action SOME_ACTION_TYPE
is dispatched that updates state.subState.path
,
then the middleware might log:
redux-log-state-diff: action "SOME_ACTION_TYPE", predicate "subState.path" {...a state diff object..}
If you want to be able to control which values are logged at runtime, you could wire up a query parameter:
1import { logStateDiffParams } from 'redux-log-state-diff' 2 3createStore( 4 reducer, 5 applyMiddleware(logStateDiffParams()) 6)
Then hit your app with a __REDUX_LOG_STATE_DIFF__
query parameter with comma-separated state paths:
https://localhost:8000/my/path?__REDUX_LOG_STATE_DIFF__=subState.path,otherSubPath.somewhere
and it will act as if you had configured with these state paths:
1logStateDiff([ 2 'subState.path', 3 'otherSubPath.somewhere', 4])
logStateDiffParams
accepts the same arguments as logStateDiff
- that is, pathsAndPredicates
(which will be merged with params-derived ones), and options
.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/21 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
69 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More