redux-falsy
Drop falsy values that have been dispatched into redux
Last updated 5 years ago by ashaffer88 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install redux-falsy 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)

Copyright 2014 - 2016 © taobao.org |