Javascript String snakeCaseDash()

Description

Javascript String snakeCaseDash()

String.prototype.snakeCaseDash = function() {
 return this.replace( /([A-Z])/g, function( $1 ) {return "-" + $1.toLowerCase();} );
};



PreviousNext

Related