Javascript String toController()

Description

Javascript String toController()


'use strict';/*from w w  w.j  av a2  s .  c  o m*/

String.prototype.toController = function () {
    return this.replace(/([a-z](?=[A-Z]))Controller/g, '$1.controller').toLowerCase();
};



PreviousNext

Related