Gathering detailed insights and metrics for redux-persist-complex-transform
Gathering detailed insights and metrics for redux-persist-complex-transform
Gathering detailed insights and metrics for redux-persist-complex-transform
Gathering detailed insights and metrics for redux-persist-complex-transform
This transform allows filter, encrypt, compress, versioning and expiring persisted data from redux-persist. Also works with immutable and seamless-immutable data structures.
npm install redux-persist-complex-transform
Typescript
Module System
Node Version
NPM Version
TypeScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
12 Commits
1 Watchers
1 Branches
1 Contributors
Updated on May 24, 2023
Latest Version
1.0.5
Package Id
redux-persist-complex-transform@1.0.5
Unpacked Size
20.03 kB
Size
5.20 kB
File Count
8
NPM Version
6.4.1
Node Version
10.15.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
15
5
This transform allows filter, encrypt, compress, versioning and expiring persisted data from redux-persist. Also works with immutable and seamless-immutable data structures.
npm install redux-persist-complex-transform
or
yarn add redux-persist-complex-transform
Variable | Type | Description |
---|---|---|
config | {[key: string]: {Options & Exclusive options}} | Configures transformation of the selected reducers. (key represents a reducer name used in redux store) |
dataStructure | string | State data structure. The only available options: 'plain', 'immutable', 'seamless-immutable'. (default: plain) |
password | string | Password for a data encryption. (optional) |
whitelist | Array | Specifies reducers on which this transform should be applied. (default: all listed in the config above) |
Variable | Type | Description |
---|---|---|
defaultState | {[key: string]: any} | Redefines the default state for the selected reducer. (required only with the default (autoMergeLevel1) state reconciler, otherwise it's optional) |
expire | number | An expiration time in minutes. (default: 0 -> never) |
version | string | State version. (optional) |
Expiring or changing the version, turns a persisted state of the selected reducer to default.
Only a one option from each of these groups can be applied at the same time.
Variable | Type | Description |
---|---|---|
encrypt | boolean | Specify, if the reducer state should be encrypted on its way to a storage. (default: false) |
compress | boolean | Specify, if the reducer state should be compressed on its way to a storage. (default: false) |
Variable | Type | Description |
---|---|---|
blacklist | Array | Excludes the selected variables from persist. (optional) |
whitelist | Array | Defines which an only variables will be persistent. (optional) |
1import complexTransform from 'redux-persist-complex-transform' 2import { reducer as UserDataReduxReducer, INITIAL_STATE as UserDataInitial } from '../Redux/UserDataRedux' 3import { reducer as AppDataReduxReducer, INITIAL_STATE as AppDataInitial } from '../Redux/AppDataRedux' 4 5const reduxConfig = { 6 appData: { 7 defaultState: AppDataInitial, 8 blacklist: ['some variable excluded from persist'], 9 compress: true, 10 version: 2, 11 }, 12 userData: { 13 defaultState: UserDataInitial, 14 encrypt: true, 15 version: 1, 16 }, 17}, whitelist = Object.keys(reduxConfig) 18 19const persistConfig = { 20 key: 'app', 21 storage: localForage.createInstance({ 22 drive: localForage.INDEXEDDB, 23 name: 'MyAPP', 24 }), 25 transforms: [ 26 complexTransform({ 27 config: reduxConfig, 28 password: '12345', 29 whitelist, 30 }), 31 ], 32 whitelist, 33} 34 35const rootReducer = () => 36 persistReducer(persistConfig, 37 combineReducers({ 38 appData: AppDataReduxReducer, 39 userData: UserDataReduxReducer, 40 }) 41 )
1import complexTransform from 'redux-persist-complex-transform' 2import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/autoMergeLevel2' 3import { reducer as UserDataReduxReducer } from '../Redux/UserDataRedux' 4import { reducer as AppDataReduxReducer } from '../Redux/AppDataRedux' 5 6const reduxConfig = { 7 appData: { 8 blacklist: ['some variable excluded from persist'], 9 compress: true, 10 version: 2, 11 }, 12 userData: { 13 encrypt: true, 14 version: 1, 15 }, 16}, whitelist = Object.keys(reduxConfig) 17 18const persistConfig = { 19 key: 'app', 20 stateReconciler: autoMergeLevel2, 21 storage: localForage.createInstance({ 22 drive: localForage.INDEXEDDB, 23 name: 'MyAPP', 24 }), 25 transforms: [ 26 complexTransform({ 27 config: reduxConfig, 28 password: '12345', 29 whitelist, 30 }), 31 ], 32 whitelist, 33} 34 35const rootReducer = () => 36 persistReducer(persistConfig, 37 combineReducers({ 38 appData: AppDataReduxReducer, 39 userData: UserDataReduxReducer, 40 }) 41 )
1import complexTransform from 'redux-persist-complex-transform' 2import { seamlessImmutableReconciler } from 'redux-persist-seamless-immutable' 3import { reducer as UserDataReduxReducer } from '../Redux/UserDataRedux' 4import { reducer as AppDataReduxReducer } from '../Redux/AppDataRedux' 5 6const reduxConfig = { 7 appData: { 8 blacklist: ['some variable excluded from persist'], 9 compress: true, 10 version: 2, 11 }, 12 userData: { 13 encrypt: true, 14 version: 1, 15 }, 16}, whitelist = Object.keys(reduxConfig) 17 18const persistConfig = { 19 key: 'app', 20 stateReconciler: seamlessImmutableReconciler, 21 storage: localForage.createInstance({ 22 drive: localForage.INDEXEDDB, 23 name: 'MyAPP', 24 }), 25 transforms: [ 26 complexTransform({ 27 config: reduxConfig, 28 dataStructure: 'seamless-immutable', 29 password: '12345', 30 whitelist, 31 }), 32 ], 33 whitelist, 34} 35 36const rootReducer = () => 37 persistReducer(persistConfig, 38 combineReducers({ 39 appData: AppDataReduxReducer, 40 userData: UserDataReduxReducer, 41 }) 42 )
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/10 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 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
SAST tool is not run on all commits -- score normalized to 0
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