Expose js api, add tests
Merge pull request #2 from taterbase/master

Expose js api, add tests