update JS library code

update JS library code