<commit_before>export function toArray<T>(value: T | T[]): T[] {
  return [].concat(value);
}

export function flatten<T>(value: Array<T | T[]>): T[] {
  return [].concat.apply([], value);
}

export function unique<T>(value: T[]): T[] {
  // todo: his has been fixed in TypeScript 2.8 remove the casting when updating
  return [...new Set(value) as any];
}<commit_msg>refactor: remove casting that is no longer required<commit_after>export function toArray<T>(value: T | T[]): T[] {
  return [].concat(value);
}

export function flatten<T>(value: Array<T | T[]>): T[] {
  return [].concat.apply([], value);
}

export function unique<T>(value: T[]): T[] {
  return [...new Set(value)];
}
{'fraction_non_alphanumeric': 0.20262390670553937, 'fraction_numerical': 0.0029154518950437317, 'mean_word_length': 4.677685950413223, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '5750713', 'n_tokens_mistral': 233, 'n_tokens_neox': 231, 'n_words': 72}