0

I have this code

const blobData = new Blob([url])

and when I run standard js it throws "'Blob' is not defined"

Someone have an idea why it's happening?

reaktor_2004
  • 49
  • 1
  • 1
  • 6

1 Answers1

3

You can also use Blob inside your browser: https://developer.mozilla.org/en-US/docs/Web/API/Blob. To resolve this lint issue you have to configure your eslint config like this:

in package.json:

...
"standard": {
  "env": {
    "browser": true
  }
},
...

or in .eslintrc:

{
  "env": {
    "browser": true
  },
  ...
}
Dieter Casier
  • 633
  • 5
  • 9