{"size": 388, "ext": "js", "max_stars_repo_path": "app/common/utils/createReducer.js", "max_stars_repo_name": "OscillatingMonkey/desktop-wallet", "max_stars_repo_stars_event_min_datetime": "2018-04-09T20:47:32.000Z", "max_stars_repo_stars_event_max_datetime": "2020-06-25T01:02:54.000Z", "max_issues_repo_path": "app/common/utils/createReducer.js", "max_issues_repo_name": "OscillatingMonkey/desktop-wallet", "max_issues_repo_issues_event_min_datetime": "2018-04-09T20:25:38.000Z", "max_issues_repo_issues_event_max_datetime": "2019-06-22T15:36:12.000Z", "max_forks_repo_path": "app/common/utils/createReducer.js", "max_forks_repo_name": "OscillatingMonkey/desktop-wallet", "max_forks_repo_forks_event_min_datetime": "2018-07-08T02:22:09.000Z", "max_forks_repo_forks_event_max_datetime": "2021-01-14T23:21:41.000Z"}
{"max_stars_count": 11, "max_issues_count": 13, "max_forks_count": 17, "avg_line_length": 25.8666666667, "max_line_length": 65, "alphanum_fraction": 0.631443299}
import { stat } from "fs-extra-p"

export default function createReducer (INITIAL_STATE, reducers) {
  return (state = INITIAL_STATE, action) => {
    if (action.type === 'auth/logout') {
      console.log('Logout')
      state = undefined
      return state
    } else {
      let reducer = reducers[action.type]
      return reducer ? reducer(state, action.payload) : state
    }
  }
}
