New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@connected-home/redux-persist-transform-encrypt

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@connected-home/redux-persist-transform-encrypt

Encrypt your Redux store.

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by36.36%
Maintainers
5
Weekly downloads
 
Created
Source

redux-persist-transform-encrypt

npm Travis

Encrypt your Redux store.

Usage

Synchronous

import { persistReducer } from 'redux-persist'
import createEncryptor from 'redux-persist-transform-encrypt'

const encryptor = createEncryptor({
  secretKey: 'my-super-secret-key',
  onError: function(error) {
    // Handle the error.
  }
})

const reducer = persistReducer(
  {
    transforms: [encryptor]
  },
  baseReducer
)

Asynchronous

Note: Asynchronous support is still a work in progress.

import { persistReducer } from 'redux-persist'
import createAsyncEncryptor from 'redux-persist-transform-encrypt/async'

const asyncEncryptor = createAsyncEncryptor({
  secretKey: 'my-super-secret-key'
})

const reducer = persistReducer(
  {
    transforms: [asyncEncryptor]
  },
  baseReducer
)

Custom Error Handling

The onError property given to the createEncryptor options is an optional function that receives an Error object as its only parameter. This allows custom error handling from the parent application.

Keywords

FAQs

Package last updated on 20 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc