This looks like a job for [inflection-js](http://www.findbestopensource.com/product/inflection-js)!