<commit_before>import {List} from 'immutable';
import getRandomInt from './getRandomInt';
import * as details from '../constants/ShapeDetail';

export const getOfObjectToList = object =>
  List(Object.keys(object).map(kind => object[kind]));

export const getRandomItemOfList = list => list.get(getRandomInt(0, list.size - 1));

export const getRandomDetails =
  getRandomItemOfList.bind(null, getOfObjectToList(details));

/* export const callRepeat = (n, f, a) =>
  new Array(n).fill(null).reduce(res => f(res), a);*/<commit_msg>add to core getDetail() for test<commit_after>import {List} from 'immutable';
import getRandomInt from './getRandomInt';
import * as details from '../constants/ShapeDetail';

export const getOfObjectToList = object =>
  List(Object.keys(object).map(kind => object[kind]));

export const getRandomItemOfList = list => list.get(getRandomInt(0, list.size - 1));

export const getRandomDetails =
  getRandomItemOfList.bind(null, getOfObjectToList(details));

export const getDetail = kind => details[kind];

/* export const callRepeat = (n, f, a) =>
  new Array(n).fill(null).reduce(res => f(res), a);*/
{'fraction_non_alphanumeric': 0.15221238938053097, 'fraction_numerical': 0.0035398230088495575, 'mean_word_length': 5.652941176470589, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, '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': '6618671', 'n_tokens_mistral': 353, 'n_tokens_neox': 354, 'n_words': 91}