Socket
Socket
Sign inDemoInstall

redux-freeze

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    redux-freeze

Redux middleware that prevents state from being mutated anywhere in the app


Version published
Weekly downloads
13K
increased by1.05%
Maintainers
1
Install size
9.45 kB
Created
Weekly downloads
 

Readme

Source

redux-freeze

NPM

Build Status

Redux middleware that prevents state from being mutated anywhere in the app. When mutation occurs, an error will be thrown by the runtime. This is useful during development mode to ensure that no part of the app accidentally mutates the state.

Usage

// Only includes in DEV mode
if (__DEV__) {
  const freeze = require('redux-freeze')
  reduxMiddleware.push(freeze)
}

Test

npm install
npm test

Changes

0.1.7

  • Fix bug state not frozen before the first dispatch

0.1.5

  • Fix bug error is thrown when an object in the state has null prototype

0.1.4

  • Fix bug error is thrown when the state is not freezable

0.1.3

  • Fix bug result of the middleware is not returned

Keywords

FAQs

Last updated on 03 Oct 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc