redux-storage-decorator-immutable-filter

1.0.1 • Public • Published

[redux-storage-decorator-immutable-filter][]

build dependencies devDependencies

license npm version npm downloads Code Climate

Filter decorator for redux-storage to only store a subset of the whole state tree. Especially useful if your state tree is an immutable Map.

Installation

npm install --save redux-storage-decorator-immutable-filter

Usage

Simply wrap your engine in this decorator, whitelist all keys that should be passed through and blacklist the keys that shouldn't.

import filter from 'redux-storage-decorator-immutable-filter'
 
engine = filter(engine, [
    'whitelisted-key',
    ['nested', 'key'],
    ['another', 'very', 'nested', 'key']
], [
    'backlisted-key',
    ['nested', 'blacklisted-key']
]);

Package Sidebar

Install

npm i redux-storage-decorator-immutable-filter

Weekly Downloads

109

Version

1.0.1

License

ISC

Last publish

Collaborators

  • danscan