All files index.js

0% Statements 0/13
0% Branches 0/6
0% Functions 0/1
0% Lines 0/11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19                                     
import { create } from './create'
import { run } from './run'
 
const createWrapper = () => {
  if (!window.Worker) {
    console.error('This browser does not support Workers.')
    return null
  }
  if (!(window.URL.createObjectURL || window.webkitURL.createObjectURL)) {
    console.error('This browser does not have URL.createObjectURL method.')
    return null
  }
  return { create, run }
}
 
const WorkerWrapper = createWrapper()
 
export default WorkerWrapper