Strip new lines in js

Fixes #1