All Projects → edy → Redux Persist Transform Filter

edy / Redux Persist Transform Filter

Licence: mit
Filter transformator for redux-persist

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Redux Persist Transform Filter

vesdk-android-demo
VideoEditor SDK: A fully customizable video editor for your app.
Stars: ✭ 90 (-51.09%)
Mutual labels:  filter, transform
Pixelsdk
The modern photo and video editor for your iPhone / iPad app. A fully customizable image & video editing iOS Swift framework.
Stars: ✭ 192 (+4.35%)
Mutual labels:  filter, transform
Filtrex
A library for performing and validating complex filters from a client (e.g. smart filters)
Stars: ✭ 157 (-14.67%)
Mutual labels:  filter
Ugm
Ubpa Graphics Mathematics
Stars: ✭ 178 (-3.26%)
Mutual labels:  transform
Elasticsearch Gmail
Index your Gmail Inbox with Elasticsearch
Stars: ✭ 1,964 (+967.39%)
Mutual labels:  filter
Spring Boot Examples
个人学习 SpringBoot2.x 写的一些示例程序,目前正在持续更新中.....
Stars: ✭ 159 (-13.59%)
Mutual labels:  filter
Neversink Filter
This is a lootfilter for the game "Path of Exile". It hides low value items, uses a markup-scheme and sounds to highlight expensive gear and is based on economy data mining.
Stars: ✭ 2,164 (+1076.09%)
Mutual labels:  filter
Gpuimage X
A Cross-platform (for both Android & iOS) Framework for GPU-based Filters, Video and Image Processing.
Stars: ✭ 154 (-16.3%)
Mutual labels:  filter
Camerafilters
📷 摄像头实时滤镜处理库,自带10多种滤镜,支持滤镜扩展,并且兼容七牛云直播滤镜处理
Stars: ✭ 181 (-1.63%)
Mutual labels:  filter
Pegparser
💡 Build your own programming language! A C++17 PEG parser generator supporting parser combination, memoization, left-recursion and context-dependent grammars.
Stars: ✭ 164 (-10.87%)
Mutual labels:  filter
Shuffle
Categorize, sort, and filter a responsive grid of items
Stars: ✭ 2,170 (+1079.35%)
Mutual labels:  filter
Muuri React
The layout engine for React
Stars: ✭ 163 (-11.41%)
Mutual labels:  filter
Coveragechecker
Allows old code to use new standards
Stars: ✭ 159 (-13.59%)
Mutual labels:  filter
Pydesignpattern
Design Pattern that described by Python, This is the source code for the book of Everybody Know Design Patterns.
Stars: ✭ 174 (-5.43%)
Mutual labels:  filter
Multiselectspinner
Android - Select Multiple Items from Spinner with Filtration.
Stars: ✭ 158 (-14.13%)
Mutual labels:  filter
Vue Morphling
Vue filters and directives collection.
Stars: ✭ 179 (-2.72%)
Mutual labels:  filter
Gl React Instagramfilters
Instagram filters for gl-react and gl-react-native
Stars: ✭ 157 (-14.67%)
Mutual labels:  filter
Logcool
A high performance and near real time log collector.
Stars: ✭ 161 (-12.5%)
Mutual labels:  filter
Typescript Transform Paths
Transforms absolute imports to relative
Stars: ✭ 166 (-9.78%)
Mutual labels:  transform
Transformation Matrix
Javascript isomorphic 2D affine transformations written in ES6 syntax. Manipulate transformation matrices with this totally tested library!
Stars: ✭ 184 (+0%)
Mutual labels:  transform

redux-persist-transform-filter

npm Build Status

Filter transformator for redux-persist

Installation

  npm install redux-persist-transform-filter

Usage

import { createFilter, createBlacklistFilter } from 'redux-persist-transform-filter';

// this works too:
import createFilter, { createBlacklistFilter } from 'redux-persist-transform-filter';

// you want to store only a subset of your state of reducer one
const saveSubsetFilter = createFilter(
  'myReducerOne',
  ['keyYouWantToSave1', 'keyYouWantToSave2']
);

// you want to remove some keys before you save
const saveSubsetBlacklistFilter = createBlacklistFilter(
  'myReducerTwo',
  ['keyYouDontWantToSave1', 'keyYouDontWantToSave2']
);

// you want to load only a subset of your state of reducer three
const loadSubsetFilter = createFilter(
  'myReducerThree',
  null,
  ['keyYouWantToLoad1', 'keyYouWantToLoad2']
);

// saving a subset and loading a different subset is possible
// but doesn't make much sense because you'd load an empty state
const saveAndloadSubsetFilter = createFilter(
  'myReducerFour',
  ['one', 'two']
  ['three', 'four']
);

const predicateFilter = persistFilter(
	'form',
	[
		{ path: 'one', filterFunction: (item: any): boolean => item.mustBeStored },
		{ path: 'two', filterFunction: (item: any): boolean => item.mustBeStored },
	],
	'whitelist'
)

const normalPathFilter = persistFilter(
	'form',
	['one', 'two'],
	'whitelist'
)

persistStore(store, {
  transforms: [
    saveSubsetFilter,
    saveSubsetBlacklistFilter,
    loadSubsetFilter,
    saveAndloadSubsetFilter,
  ]
});

Example project

git clone https://github.com/edy/redux-persist-transform-filter-example.git
cd redux-persist-transform-filter-example
npm install
npm start
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].