Skip to content

ashaffer/redux-falsy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-falsy

js-standard-style

Drop falsy values that have been dispatched into redux. This may be a candidate for the simplest redux middleware possible.

Installation

$ npm install redux-falsy

Usage

All it does is drop falsy actions from continuing into your middleware stack. This is useful in environments where you are using the return values of things as your actions, as in vdux. The source code of this module is all the documentation you should need:

function falsy () {
  return next => action => action && next(action)
}

Put it at the top of your middleware stack to avoid them getting into any of your middlewares.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published