Gathering detailed insights and metrics for @piotr-cz/redux-persist-idb-storage
Gathering detailed insights and metrics for @piotr-cz/redux-persist-idb-storage
Gathering detailed insights and metrics for @piotr-cz/redux-persist-idb-storage
Gathering detailed insights and metrics for @piotr-cz/redux-persist-idb-storage
Redux Persist adapter for IndexedDB storage
npm install @piotr-cz/redux-persist-idb-storage
Typescript
Module System
Node Version
NPM Version
78.5
Supply Chain
94.5
Quality
75.3
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
249,161
Last Day
18
Last Week
1,527
Last Month
6,500
Last Year
73,363
MIT License
27 Stars
69 Commits
4 Forks
1 Watchers
2 Branches
2 Contributors
Updated on Mar 14, 2025
Minified
Minified + Gzipped
Latest Version
1.1.3
Package Id
@piotr-cz/redux-persist-idb-storage@1.1.3
Unpacked Size
31.97 kB
Size
7.24 kB
File Count
12
NPM Version
6.14.14
Node Version
14.17.5
Cumulative downloads
Total Downloads
Last Day
-48.6%
18
Compared to previous day
Last Week
-20.3%
1,527
Compared to previous week
Last Month
-6.9%
6,500
Compared to previous month
Last Year
62.8%
73,363
Compared to previous year
Storage adapter to use IndexedDB via idb v3 with redux-persist ripped from idb v3 docs > Examples section
Using npm:
1npm install --save @piotr-cz/redux-persist-idb-storage
or Yarn:
1yarn add @piotr-cz/redux-persist-idb-storage
Import the storage and include it in persistConfig
when creating Redux store:
1// configureStore.js 2 3// Using CommonJS modules 4import createIdbStorage from '@piotr-cz/redux-persist-idb-storage' 5 6// Or using ES6 modules 7import createIdbStorage from '@piotr-cz/redux-persist-idb-storage/src' 8 9const persistConfig = { 10 key: 'root', 11 storage: createIdbStorage({name: 'myApp', storeName: 'keyval'}), 12 serialize: false, // Data serialization is not required and disabling it allows you to inspect storage value in DevTools 13} 14 15// ...
When using Server-Side Rendering (SSR), indexedDB won't be available in the environment.
In this case you may use feature detection with a fallback to use default redux-persist storage (which resolves to noop functions):
1// configureStore.js 2 3// Redux Persist storage 4import defaultStorage from 'redux-persist/lib/storage' 5 6// IndexedDB storage 7import createIdbStorage from '@piotr-cz/redux-persist-idb-storage/src' 8 9const persistConfig = { 10 key: 'root', 11 storage: globalThis.indexedDB ? createIdbStorage({name: 'myApp', storeName: 'keyval'}) : defaultStorage, 12 serialize: false, 13}
See idb API
name
(optional): IndexedDB Database name. Defaults to 'keyval-store'
.storeName
(optional): IndexedDB Store name. Defaults to 'keyval'
.version
(optional): Schema version. Defaults to 1
.upgradeCallback
(optional): Defaults to upgradeDb => upgradeDb.createObjectStore(options.storeName)
.No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
Found 0/12 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
project is not fuzzed
Details
Reason
security policy file not detected
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-06-30
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