Created
September 11, 2019 21:48
-
-
Save 7cc/3eeea9a8eb37dbc03dc43b190bdde899 to your computer and use it in GitHub Desktop.
js import from Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function importFromGist(gistURL) { | |
var scriptText = await fetch(gistURL).then(res=> res.text()) | |
var blob = new Blob([scriptText], { | |
type: "application/javascript" | |
}) | |
var url = URL.createObjectURL(blob) | |
return await import(url) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://deno.land/x/import_script