1.0.1 • Published 8 years ago

redux-storage-decorator-immutable-filter v1.0.1

Weekly downloads
537
License
ISC
Repository
github
Last release
8 years ago

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']
]);