Javascript library to access documents