Installations
npm install redux-persist-transform-filter
Developer
edy
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
18.11.0
NPM Version
8.19.2
Statistics
190 Stars
54 Commits
21 Forks
6 Watching
4 Branches
9 Contributors
Updated on 02 Oct 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
8,802,679
Last day
-17.2%
4,017
Compared to previous day
Last week
-4.8%
24,584
Compared to previous week
Last month
-25%
113,289
Compared to previous month
Last year
18.5%
2,009,347
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Peer Dependencies
2
redux-persist-transform-filter
Filter transformator for redux-persist
Installation
npm install redux-persist-transform-filter
Usage
1import { createFilter, createBlacklistFilter } from 'redux-persist-transform-filter'; 2 3// this works too: 4import createFilter, { createBlacklistFilter } from 'redux-persist-transform-filter'; 5 6// you want to store only a subset of your state of reducer one 7const saveSubsetFilter = createFilter( 8 'myReducerOne', 9 ['keyYouWantToSave1', 'keyYouWantToSave2'] 10); 11 12// you want to remove some keys before you save 13const saveSubsetBlacklistFilter = createBlacklistFilter( 14 'myReducerTwo', 15 ['keyYouDontWantToSave1', 'keyYouDontWantToSave2'] 16); 17 18// you want to load only a subset of your state of reducer three 19const loadSubsetFilter = createFilter( 20 'myReducerThree', 21 null, 22 ['keyYouWantToLoad1', 'keyYouWantToLoad2'] 23); 24 25// saving a subset and loading a different subset is possible 26// but doesn't make much sense because you'd load an empty state 27const saveAndloadSubsetFilter = createFilter( 28 'myReducerFour', 29 ['one', 'two'] 30 ['three', 'four'] 31); 32 33const predicateFilter = persistFilter( 34 'form', 35 [ 36 { path: 'one', filterFunction: (item: any): boolean => item.mustBeStored }, 37 { path: 'two', filterFunction: (item: any): boolean => item.mustBeStored }, 38 ], 39 'whitelist' 40) 41 42const normalPathFilter = persistFilter( 43 'form', 44 ['one', 'two'], 45 'whitelist' 46) 47 48persistStore(store, { 49 transforms: [ 50 saveSubsetFilter, 51 saveSubsetBlacklistFilter, 52 loadSubsetFilter, 53 saveAndloadSubsetFilter, 54 ] 55});
Example project
1git clone https://github.com/edy/redux-persist-transform-filter-example.git 2cd redux-persist-transform-filter-example 3npm install 4npm start
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
Found 6/28 approved changesets -- score normalized to 2
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
- 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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 8 are checked with a SAST tool
Reason
20 existing vulnerabilities detected
Details
- 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-4q6p-r6v2-jvc5
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-7jxr-cg7f-gpgv
- Warn: Project is vulnerable to: GHSA-xj72-wvfv-8985
- Warn: Project is vulnerable to: GHSA-ch3r-j5x3-6q2m
- Warn: Project is vulnerable to: GHSA-p5gc-c584-jj6v
- Warn: Project is vulnerable to: GHSA-whpj-8f3w-67p5
- Warn: Project is vulnerable to: GHSA-cchq-frgv-rjh5
- Warn: Project is vulnerable to: GHSA-g644-9gfx-q4q4
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
2.3
/10
Last Scanned on 2024-11-25
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