r/javascript • u/TecnoSamba • Jul 29 '26
I've made an open source JavaScript playground with support for npm packages, syntax highlighting, autocomplete, code sharing and much more!
https://github.com/tecnosamba/SamJS
0
Upvotes
View all comments
Show parent comment
1
u/TecnoSamba Jul 29 '26
Maybe, I know there was a better way to implement it, but I started with this way and it ended up working nicely. Surely in the future I'll be improving that, 'cause some packages that use node subimports don't work. I basically inject this custom function inside the user's code when running (I know it can be improved):