s2s-helper-get-reducer-case
Helper function to get reducer case
Last updated 4 months ago by akameco .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install s2s-helper-get-reducer-case 
SYNC missed versions from official npm registry.

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']

Current Tags

  • 1.0.1                                ...           latest (4 months ago)

11 Versions

  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           7 months ago
  • 0.2.6                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 6
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |