First commit consisting the js api and test cases for each method