1.0.1 • Published 9 years ago
redux-storage-decorator-immutable-filter v1.0.1
redux-storage-decorator-immutable-filter
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-filterUsage
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']
]);