<commit_before>import { h, render } from 'preact';
import App from './App';
import { useStrict } from 'mobx';


const dots = (loader) => {
    let i = 0;
    setInterval(function() {
        i++;
        loader.insertAdjacentHTML('beforeend', '<span>.</span>');
        if (i >= 4) {
            i = 0;
            loader.querySelectorAll("span").forEach(span => {
                span.remove();
            });
        }
    }, 500);
};

export function init() {
    useStrict(true);
    const loader = document.getElementById('preact-loader');
    dots(loader);
    fetch('/storelocator/index/json')
        .then(data => data.json())
        .then(json => {
            loader.remove();
            render(<App json={json}/>, document.getElementById('preact-root'));
        });
}<commit_msg>IP-52 Fetch polyfill v2<commit_after>import { h, render } from 'preact';
import App from './App';
import { useStrict } from 'mobx';
import 'whatwg-fetch';


const dots = (loader) => {
    let i = 0;
    setInterval(function() {
        i++;
        loader.insertAdjacentHTML('beforeend', '<span>.</span>');
        if (i >= 4) {
            i = 0;
            loader.querySelectorAll("span").forEach(span => {
                span.remove();
            });
        }
    }, 500);
};

export function init() {
    useStrict(true);
    const loader = document.getElementById('preact-loader');
    dots(loader);
    fetch('/storelocator/index/json')
        .then(data => data.json())
        .then(json => {
            loader.remove();
            render(<App json={json}/>, document.getElementById('preact-root'));
        });
}
{'fraction_non_alphanumeric': 0.17683302526186076, 'fraction_numerical': 0.009242144177449169, 'mean_word_length': 2.147286821705426, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '7568878', 'n_tokens_mistral': 505, 'n_tokens_neox': 481, 'n_words': 99}