add gist helper
This commit is contained in:
parent
1d4129e84d
commit
1dda16c010
2 changed files with 8 additions and 1 deletions
6
repl/src/gist.js
Normal file
6
repl/src/gist.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
// this is a shortcut to eval code from a gist
|
||||
// why? to be able to shorten strudel code + e.g. be able to change instruments after links have been generated
|
||||
export default (route) =>
|
||||
fetch(`https://gist.githubusercontent.com/${route}?cachebust=${Date.now()}`)
|
||||
.then((res) => res.text())
|
||||
.then((code) => eval(code));
|
||||
Loading…
Add table
Add a link
Reference in a new issue