Improve docs into javascript converter