s2s-helper-get-reducer-case
v1.0.1
Published
Helper function to get reducer case
Downloads
3
Readme
s2s-helper-get-reducer-case
Helper function to get reducer case
API
import helper from 's2s-helper-get-reducer-case'
const fixture = `
export default function(state, action) {
switch(action.type) {
case Actions.INCREMENT:
return { count: state + 1}
case Actions.DECREMENT:
return { count: state - 1}
default:
return state
}
}
`
helper(fixture)
// => ['INCREMENT', 'DECREMENT']