<commit_before>// import {isFunction} from 'lodash';
import StatusActions from 'actions/status-actions';
import LoginActions from 'actions/login-actions';

export default {
  networkAction: async (context, method, ...params) => {
    // try {
      StatusActions.started();
      const response = await method.apply(context, params);
      // const data = isFunction(response) ? response().data : response.data;
      context.dispatch(response().data);
      StatusActions.done();
    // } catch (err) {
    //   console.error(err);
    //   if (err.status === 401) {
    //     LoginActions.logout();
    //   }
    //   else {
    //     StatusActions.failed({config: err.config, action: context.actionDetails});
    //   }
    // }
  }
};
<commit_msg>upgraded to alt.js 18.2; updated code and actions for new syntax<commit_after>// import {isFunction} from 'lodash';
import alt from 'utils/alt';
import StatusActions from 'actions/status-actions';
import LoginActions from 'actions/login-actions';

export default {
  networkAction: async (dispatch, context, method, ...params) => {
    // try {
      StatusActions.started();
      const response = await method.apply(context, params);
      // const data = isFunction(response) ? response().data : response.data;
      dispatch(response().data);
      StatusActions.done();

    // } catch (err) {
    //   console.error(err);
    //   if (err.status === 401) {
    //     LoginActions.logout();
    //   }
    //   else {
    //     StatusActions.failed({config: err.config, action: context.actionDetails});
    //   }
    // }
  }
};

{'fraction_non_alphanumeric': 0.15901948460087995, 'fraction_numerical': 0.0056568196103079825, 'mean_word_length': 2.5936794582392775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4593129', 'n_tokens_mistral': 473, 'n_tokens_neox': 459, 'n_words': 107}