I would imagine this is a multiple part situation with regex, but how would you split a camelcase string at the capital letters turning them in to lowercase letters, and the
String.prototype.camelCaseToDashed = function(){ return this.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); } // Usage "SomeVariable".camelCaseToDashed();