github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/helpers/css-class.js (about) 1 import { helper } from '@ember/component/helper'; 2 import { dasherize } from '@ember/string'; 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 dasherize(updateType.replace(/\//g, '-')); 13 } 14 15 export default helper(cssClass);