Allow file urls
Allows access to local files via file://
Thanks for the PR, I understand the use case it is trying to address and believe it's doable. Unfortunately the patch as it stands cannot be practically merged, as most of the changes are editorial and would create inconsistencies with the coding style. I'm sure we can figure out pretty easily the minimum set of changes for supporting 'file://' URIs. Can you open an issue with a short description to track progress?
Sorry, I applied my code formatter to your files because they were unreadable in my editor. There appears to be a mixture of tabs and spaces in your project. I've reverted them, but I'd consider using something like prettier across your project. You can configure it to match your code style.
Here's what it looks like in my editor.
