Typographer in JavaScript