1.0.0 • Published 10 years ago

@micro-js/reduce-replace v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 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 @micro-js/reduce-replace

Usage

var reduceReplace = require('@micro-js/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

1.0.0

10 years ago