Skip to content

micro-js/reduce-replace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A reducer that replaces the accumulator with the next value.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •