first crack at a JS version
Merge pull request #1 from kmulvey/feature/js

first crack at a JS version