New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

redux-deep-persist

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-deep-persist - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

5

package.json
{
"name": "redux-deep-persist",
"version": "1.0.2",
"version": "1.0.3",
"description": "Allows to easily create a deep configuration of a whitelist or blacklist for the redux-persist module.",

@@ -11,4 +11,3 @@ "author": "Piotr Kujawa <piotrkujawa.dev@gmail.com>",

"src",
"lib",
"README.md"
"lib"
],

@@ -15,0 +14,0 @@ "scripts": {

21

README.md
# Redux Deep Persist
[![npm version](https://img.shields.io/npm/v/redux-deep-persist?style=flat-square)](https://img.shields.io/npm/v/redux-deep-persist) [![npm downloads](https://img.shields.io/npm/dw/redux-deep-persist?style=flat-square)](https://img.shields.io/npm/dw/redux-deep-persist) [![license](https://img.shields.io/github/license/PiotrKujawa/redux-deep-persist?style=flat-square)](https://img.shields.io/github/license/PiotrKujawa/redux-deep-persist)
<a href="https://dev835.d86k7pvhbipq8.amplifyapp.com" target="_blank">Demo Page</a>

@@ -7,7 +10,7 @@

It contains transforms and state reconciler for [Redux Persist](https://www.npmjs.com/package/redux-persist) giving you a possibility to define a nested configuration for your redux-persist.
Redux Deep Perist contains transforms and state reconciler for [Redux Persist](https://www.npmjs.com/package/redux-persist) giving you a possibility to define a nested configuration for your redux-persist.
If your redux state is deeply nested you don't have to create multiple, nested persist configs. You can easily create a whitelist or a blacklist for fields at any level of your state, using simple dot notation `[someProp.secondLevel.thirdLevel.anotherLevel]`
The state should be as flat as possible but sometimes is not and in that case, this will be very helpful.
Redux documentation recommends to keep the state as flat as possible, but it is not always possible. Redux Deep Persist may be very helpful in a situation when deep nesting is hard to avoid.

@@ -29,3 +32,3 @@ ## Installation

{
root1: {
property1: {
a1: {

@@ -43,3 +46,3 @@ b1: {

},
root2: {
property2: {
a1: {

@@ -66,5 +69,5 @@ b1: {

whitelist: [
'root1.a1.b1',
'root1.a2.b2.c2',
'root2.a2',
'property1.a1.b1',
'property1.a2.b2.c2',
'property2.a2',
],

@@ -98,6 +101,6 @@ rootReducer, // your root reducer must be also passed here

* **"Duplicates of paths found in your whitelist/blacklist."**
- _you defined duplicated paths in your whitelist or blacklist arrays. Wrong: ```["root1", "root2.a2", "root1"]```._
- _you defined duplicated paths in your whitelist or blacklist arrays. Wrong: ```["property1", "property2.a2", "property1"]```._
* **"Subsets of some parent keys found in your whitelist/blacklist. You must decide if you want to persist an entire path or its specific subset."**
- _i.e. if you want to persist the entire "user" property you can't list its subsets in the config. Wrong: ```["root1", "root1.a1"]```_
- _i.e. if you want to persist the entire "user" property you can't list its subsets in the config. Wrong: ```["property1", "property1.a1"]```_

@@ -104,0 +107,0 @@ ### Examples repository

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc