{"size": 575, "ext": "js", "max_stars_repo_path": "src/logger.js", "max_stars_repo_name": "phixo/react-reduckx", "max_stars_repo_stars_event_min_datetime": "2019-03-13T08:56:19.000Z", "max_stars_repo_stars_event_max_datetime": "2019-07-13T17:22:34.000Z", "max_issues_repo_path": "src/logger.js", "max_issues_repo_name": "phixo/react-reduckx", "max_issues_repo_issues_event_min_datetime": "2019-03-11T14:44:13.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-12T07:24:58.000Z", "max_forks_repo_path": "src/logger.js", "max_forks_repo_name": "phixo/react-reduckx", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 113, "max_forks_count": null, "avg_line_length": 30.2631578947, "max_line_length": 76, "alphanum_fraction": 0.5582608696}
/* eslint-disable no-console */
const COLOR_ACTION = '#03A9F4';
const COLOR_NEXT = '#4CAF50';
const COLOR_PREV = '#9E9E9E';

const Logger = {
    log: (action = {}, prevState = {}, nextState = {}) => {
        if (action.type) {
            console.group(action.type);
            console.log('%cprev state', `color: ${COLOR_PREV};`, prevState);
            console.log('%caction    ', `color: ${COLOR_ACTION};`, action);
            console.log('%cnext state', `color: ${COLOR_NEXT};`, nextState);
            console.groupEnd();
        }
    },
};

export default Logger;
