update documentation to js