github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/helpers/css-class.js (about)

     1  import Ember from 'ember';
     2  
     3  /**
     4   * CSS Class
     5   *
     6   * Usage: {{css-class updateType}}
     7   *
     8   * Outputs a css friendly class string from any human string.
     9   * Differs from dasherize by handling slashes.
    10   */
    11  export function cssClass([updateType]) {
    12    return updateType.replace(/\//g, '-').dasherize();
    13  }
    14  
    15  export default Ember.Helper.helper(cssClass);