I'm looking for a Javascript code generation library that is written in Javascript. I've used CodeModel in Java - https://codemodel.dev.java.net/ - and was hoping to find something similar (or better) for Javascript.
What I'm trying to do is create a visual programming environment where a user would drag and drop blocks to generate Javascript code. If anyone has used the LEGO Mindstorm IDE from a few years ago, I want to basically duplicate that but for Javascript.
I tried Googl'ing but the results are completely overwhelmed by SEO spam and things to generate buttons.
Edit: added an explanation of what I'm trying to accomplish.