javascript: changes to adapt npm package