Sha256: de4a265e4f900e9b5750757a17f71515d31d09697eadd46ff478ce3ee11069bc

Contents?: true

Size: 439 Bytes

Versions: 3

Compression:

Stored size: 439 Bytes

Contents

(function(angular) {
  'use strict';

  angular.module('ac.titleize', [])
      .filter('titleize', [function () {
        return function (string) {
          if (!!string) {
            string = string.replace(/[_-]/g, ' ').replace(/\w\S*/g, function (txt) {
              return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
            });

            return string;
          }
        };
      }]);

})(window.angular);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tablo_connect-0.0.4 app/assets/javascripts/tablo_connect/ng_app/filters/titleize_filter.js
tablo_connect-0.0.3 app/assets/javascripts/tablo_connect/ng_app/filters/titleize_filter.js
tablo_connect-0.0.2 app/assets/javascripts/tablo_connect/ng_app/filters/titleize_filter.js