{"size": 944, "ext": "js", "max_stars_repo_path": "app/reducers/bpmReducer.js", "max_stars_repo_name": "jrhalchak/BeatsPM", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/reducers/bpmReducer.js", "max_issues_repo_name": "jrhalchak/BeatsPM", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/reducers/bpmReducer.js", "max_forks_repo_name": "jrhalchak/BeatsPM", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.1538461538, "max_line_length": 44, "alphanum_fraction": 0.4766949153}
export default function bpmReducer(state = {
  count: 0,
  msFirst: 0,
  msPrevious: 0,
  tapBpm: 0,
  detectedBpm: 0,
}, action: Object) {
  switch (action.type) {
    case 'SET_COUNT': {
      return {
        ...state,
        count: Number(action.payload),
      };
    }
    case 'SET_MS_FIRST': {
      return {
        ...state,
        msFirst: Number(action.payload),
      };
    }
    case 'SET_TAP_BPM': {
      return {
        ...state,
        tapBpm: Number(action.payload),
      };
    }
    case 'SET_MS_PREVIOUS': {
      return {
        ...state,
        msPrevious: Number(action.payload),
      };
    }
    case 'CLEAR_STATE': {
      return {
        ...state,
        count: 0,
        msFirst: 0,
        msPrevious: 0,
        tapBpm: 0,
      };
    }
    case 'SET_DETECTED_BPM': {
      return {
        ...state,
        detectedBpm: action.payload,
      };
    }
    default:
      return { ...state };
  }
}
