<commit_before><commit_msg>fetch legend info helper<commit_after>//Helper that fetches legend information from mapserver
export async function fetchLegendInfo(layerUrl: string): Promise<any> {
  const legendRes = await fetch(`${layerUrl}/legend?f=pjson`)
    .then(result => result.json())
    .then(data => data)
    .catch(e => console.log(e));
  return legendRes;
}
{'fraction_non_alphanumeric': 0.1358695652173913, 'fraction_numerical': 0.0, 'mean_word_length': 5.362068965517241, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 7, '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': '4865281', 'n_tokens_mistral': 110, 'n_tokens_neox': 108, 'n_words': 28}