open-nomad/ui/app/helpers/css-class.js
Alex Dadgar e5ec915ac3 sync
2017-09-19 10:08:23 -05:00

16 lines
342 B
JavaScript

import Ember from 'ember';
/**
* CSS Class
*
* Usage: {{css-class updateType}}
*
* Outputs a css friendly class string from any human string.
* Differs from dasherize by handling slashes.
*/
export function cssClass([updateType]) {
return updateType.replace(/\//g, '-').dasherize();
}
export default Ember.Helper.helper(cssClass);