Installations
npm install redux-identity
Score
63.9
Supply Chain
92.5
Quality
75
Maintenance
100
Vulnerability
100
License
Developer
Module System
CommonJS
Statistics
1 Stars
12 Commits
3 Watching
1 Branches
1 Contributors
Updated on 19 Oct 2017
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
4,394
Last day
0%
1
Compared to previous day
Last week
0%
2
Compared to previous week
Last month
100%
4
Compared to previous month
Last year
-38.2%
47
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Redux Identity
Super tiny redux identity reducer for persisting a slice of state after updates.
Installation
npm install --save redux-identity
yarn add redux-identity
API
IdentityReducer(initialState)
IdentityReducer :: a -> a -> a
- parameter: initial state of reducer
- return: a reducer which when invoked by redux will return the given slice of state or the initial reducer state if no slice exists
Usage
Reducer only initial state
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 }
Redux Store Initial State
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 }
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE: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
- Warn: no pull requests merged into dev branch
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
69 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-hr2v-3952-633q
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c
- Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq
- Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-4hpf-3wq7-5rpr
- Warn: Project is vulnerable to: GHSA-f522-ffg8-j8r6
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h
- Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-6394-6h9h-cfjg
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3
- Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-xc7v-wxcw-j472
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.7
/10
Last Scanned on 2024-11-18
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 MoreOther packages similar to redux-identity
@zibuthe7j11/alias-exercitationem-tempora
Polynomial Identity Language (pil) compiler
generator-aspnetcore
Stand-alone web application (SPA) boilerplate built with ASP.NET Core, EF Core, Identity, C#, JavaScript, ES6/ES2015, Babel, Webpack, HMR, Browsersync, PostCSS, CSS Modules and more
redux-identity-middleware
redux identity middleware
@identity-stack/client-redux
GraphQL for sample