New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-persistent-redux

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-persistent-redux

Persistent redux store for node apps

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Persistent Redux

Persistent redux store for node apps.

Getting Started

The goal of this library is to provide a very straighforward way to write a redux store to disk. This can be useful in case you want to store a configuration, like for example with electron.

# Add the lib to your project and you are good to go.
$ yarn add node-persistent-redux

# Not in a hurry? Use npm.
$ npm install --save node-persistent-redux

Sample Code

import createPersistence from 'node-persistent-redux';

// Create redux middleware by specifying a location.
// The data will be stored in a Json on the specified location.
// It will not remove data that is already stored, however it will
// override the 'state' value of the Json. If the file does not
// exists, it will be created.
const persistence = createPersistence('~/.app-name');

// Now add the persistence middleware to the store.
const store = createStore(reducer, applyMiddleware(persistence));

Running the tests

$ git clone https://github.com/Jense5/node-persistent-redux
$ cd node-persistent-redux
$ yarn install
$ yarn test

Credits

  • Jensen Bernard - Initial work & maintenance - Jense5

This project is licensed under the MIT License - see the license file for details.

Keywords

node-persistent-redux

FAQs

Package last updated on 11 May 2017

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