Snake case a string in JavaScript