Miss any of our Open RFC calls?Watch the recordings here! »

reapp-reducer

1.0.1 • Public • Published

reapp-reducer

Simple reducer for use with flux. Reduces an array or map into an array of objects with: { id, data, status }

Status is given first so we can allow currying, ex:

var loadedReducer = reducer.bind(null, 'LOADED');
 
fetch(url).then(loadedReducer).then(store);

status is optional, default value is 'OK'

assert(reducer([1]) === [{ id: 0, data: 1, status: 'OK' }]

Keywords

none

Install

npm i reapp-reducer

DownloadsWeekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • avatar
  • avatar