teamdigitale/italia-app

View on GitHub
ts/store/transforms/setTransform.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { createTransform } from "redux-persist";

export const createSetTransform = (whitelist?: Array<string>) =>
  createTransform(
    (inboundState: any) => Array.from(inboundState),
    (outboundState: any) => new Set(outboundState),
    { whitelist }
  );