<commit_before>import restAPI from '_utils/restAPI';
import asyncActionCreator from '_utils/asyncActionCreator';
import difference from 'lodash/difference';

const api = restAPI('tracks');

export const GET_TRACKS = 'tracks/get tracks';

export function getTracks(idTracks) {
  return (dispatch, getState) => {
    const currentIds = Object.keys(getState().tracks);
    const missing = difference(idTracks, currentIds);
    if (missing.length === 0) return null;
    return asyncActionCreator(
      GET_TRACKS,
      api.read(missing),
      {
        requested: idTracks,
        missing,
      }
    )(dispatch);
  };
}

export function getTrack(idTrack) {
  getTracks([idTrack]);
}<commit_msg>fixed missing return of action creator function<commit_after>import restAPI from '_utils/restAPI';
import asyncActionCreator from '_utils/asyncActionCreator';
import difference from 'lodash/difference';

const api = restAPI('tracks');

export const GET_TRACKS = 'tracks/get tracks';

export function getTracks(idTracks) {
  return (dispatch, getState) => {
    const currentIds = Object.keys(getState().tracks);
    const missing = difference(idTracks, currentIds);
    if (missing.length === 0) return null;
    return asyncActionCreator(
      GET_TRACKS,
      api.read(missing),
      {
        requested: idTracks,
        missing,
      }
    )(dispatch);
  };
}

export function getTrack(idTrack) {
  return getTracks([idTrack]);
}
{'fraction_non_alphanumeric': 0.11428571428571428, 'fraction_numerical': 0.0013937282229965157, 'mean_word_length': 3.9517241379310346, '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': '3842215', 'n_tokens_mistral': 440, 'n_tokens_neox': 426, 'n_words': 107}