JAvaScript multi purpose library