redux-persist-transform-filter
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -10,5 +10,5 @@ declare module "redux-persist-transform-filter" { | ||
export function createBlacklistFilter<State, Raw>(reducerName: string, inboundPaths?: string[], outboundPaths?: string[]): Transform<State, Raw>; | ||
export function persistFilter<State, Raw>(state: State, paths: string[], transformType: TransformType): Transform<State, Raw>; | ||
export function persistFilter<State, Raw>(state: State, paths: string[] | { path: string, filterFunction: ((item: any) => boolean) }[], transformType: TransformType): Transform<State, Raw>; | ||
export default createFilter; | ||
} |
{ | ||
"name": "redux-persist-transform-filter", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Filter transformator for redux-persist", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -33,3 +33,3 @@ # redux-persist-transform-filter | ||
// you want to load only a subset of your state of reducer two | ||
// you want to load only a subset of your state of reducer three | ||
const loadSubsetFilter = createFilter( | ||
@@ -49,2 +49,17 @@ 'myReducerThree', | ||
const predicateFilter = persistFilter( | ||
'form', | ||
[ | ||
{ path: 'one', filterFunction: (item: any): boolean => item.mustBeStored }, | ||
{ path: 'two', filterFunction: (item: any): boolean => item.mustBeStored }, | ||
], | ||
'whitelist' | ||
) | ||
const normalPathFilter = persistFilter( | ||
'form', | ||
['one', 'two'], | ||
'whitelist' | ||
) | ||
persistStore(store, { | ||
@@ -51,0 +66,0 @@ transforms: [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12148
81