Update Javascript lib/index.js file