WIP for JS stubs
Handle remaining types and move function to common
Add description
Merge pull request #140 from gzip/master

Foundational work for generating JS stubs