A simple CSV parser in JavaScript