By quering stackoverflow, I have compiled a database of javascript functions, their parameters and bodies. In VS Code, you can search for and insert these functions, similar to Github Copilot.
Check out this youtube video explaining how I made it!
This repo is the server code. For the vscode extension go to ClonePilotExtension.