export const loadInlineWorker = (workerFn) => {
    const blob = new Blob([parseWorker(workerFn.toString())]);
    const blobURL = window.URL.createObjectURL(blob);
    return new Worker(blobURL);
};
const parseWorker = (workerString) => {
    const worker = workerString.split('{').slice(1).join('{');
    const split = worker.split('return');
    return worker.split('return').slice(0, split.length - 1).join('return');
};
