1.1.1 • Published 8 years ago

@f/reduce-replace v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

reduce-replace

Build status Git tag NPM version Code style

A reducer that replaces the accumulator with the next value

Installation

$ npm install @f/reduce-replace

Usage

var reduceReplace = require('@f/reduce-replace')

const todoReducer = combineReducers({
  text: handleActions({
    [TODO_SET_TEXT]: reduceReplace({text} => text),
  })
})

API

reduceReplace(fn)

Returns: A reducer that replaces the accumulator with the value returned by fn(value).

License

MIT