Skip to content

Instantly share code, notes, and snippets.

@Comandeer
Created July 7, 2018 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Comandeer/3e478f06b438c6984e6246ea9220580b to your computer and use it in GitHub Desktop.
Save Comandeer/3e478f06b438c6984e6246ea9220580b to your computer and use it in GitHub Desktop.
Converting Blog into Object URI
const myJSFile = new Blob( [ 'export default true;' ], { type: 'application/javascript' } );
const myJSURL = URL.createObjectURL( myJSFile );
console.log( myJSURL ); // blob:https://blog.comandeer.pl/8e8fbd73-5505-470d-a797-dfb06ca71333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment