Cleanup whitespace in JS module snippets