Gathering detailed insights and metrics for redux-identity
Gathering detailed insights and metrics for redux-identity
Gathering detailed insights and metrics for redux-identity
Gathering detailed insights and metrics for redux-identity
npm install redux-identity
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
1 Stars
12 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Oct 19, 2017
Latest Version
0.0.1
Package Id
redux-identity@0.0.1
Size
2.55 kB
NPM Version
3.10.7
Node Version
6.7.0
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
Super tiny redux identity reducer for persisting a slice of state after updates.
npm install --save redux-identity
yarn add redux-identity
IdentityReducer :: a -> a -> a
No initial state is supplied to the createStore
function
1import IdentityReducer from 'redux-identity'; 2import { combineReducers, createStore } from 'redux'; 3 4import apiReducer from '../some/local/path'; 5import counterReducer from '../some/other/local/path'; 6 7const reducers = combineReducers({ 8 CLIENT_ID: IdentityReducer('SOME UNIQUE ID'), 9 api: apiReducer, 10 counter: counterReducer 11}); 12 13let store = createStore(reducers); 14 15store.subscribe(() => console.log(store.getState()); 16 17// Dispatching any action will not update the value of state at the identity reducer slice 18store.dispatch({ type: 'FETCH' }); 19// { CLIENT_ID: 'SOME UNIQUE ID', api: {...}, counter: 0 } 20 21store.dispatch({ type: 'INCREMENT' }); 22// { CLIENT_ID: 'SOME UNIQUE ID', api: {...}, counter: 1 } 23 24store.dispatch({ type: 'DECREMENT' }); 25// { CLIENT_ID: 'SOME UNIQUE ID', api: {...}, counter: 0 }
Initial state of the identity reducer is overridden and then persisted by the corresponding slice of the state object provided to the createStore
function
1import IdentityReducer from 'redux-identity'; 2import { combineReducers, createStore } from 'redux'; 3 4import apiReducer from '../some/local/path'; 5import counterReducer from '../some/other/local/path'; 6 7const reducers = combineReducers({ 8 CLIENT_ID: IdentityReducer('SOME UNIQUE ID'), 9 api: apiReducer, 10 counter: counterReducer 11}); 12 13let store = createStore(reducers, { CLIENT_ID: '123456789' }); 14 15store.subscribe(() => console.log(store.getState()); 16 17// Dispatching any action will not update the value of state at the identity reducer slice 18store.dispatch({ type: 'FETCH' }); 19// { CLIENT_ID: '123456789', api: {...}, counter: 0 } 20 21store.dispatch({ type: 'INCREMENT' }); 22// { CLIENT_ID: '123456789', api: {...}, counter: 1 } 23 24store.dispatch({ type: 'DECREMENT' }); 25// { CLIENT_ID: '123456789', api: {...}, counter: 0 }
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
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
Found 0/12 approved changesets -- score normalized to 0
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
71 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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