JSPM

redux-storage-decorator-immutable-filter

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 111
  • Score
    100M100P100Q80112F
  • License ISC

A better filter decorator to use with redux-storage (if your state is an immutable Map)

Package Exports

  • redux-storage-decorator-immutable-filter

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (redux-storage-decorator-immutable-filter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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