doc: js api
ignore *.sw* files
laid out initial js api