Example #1
0
 // Makes filename safe strings
 cleanString(str, use_underscore) {
   const u   = use_underscore || false;
   str = str.replace(/\//g, ' ').trim();
   if (u) {
     return _s.underscored(str);
   } else {
     return _s.trim(_s.dasherize(str), '-');
   }
 }
Example #2
0
function translateFileName(fileName, componentName) {
  return S.replaceAll(fileName, 'COMPONENT_NAME',
    S.underscored(componentName));
}
Example #3
0
function templateData(componentName) {
  return {
    componentNameLowerCase: S.underscored(componentName),
    componentNameCamelCase: S.classify(componentName)
  };
}