How to use the title-case function in title-case

To help you get started, we’ve selected a few title-case examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cdes / figma-plus-advanced-rename-plugin / src / rename.js View on Github external
function currentLayer(newLayerName, layerName) {
  // UpperCase
  let name = newLayerName.replace(/%\*u%/gi, changeCase.upperCase(layerName));

  // LowerCase
  name = name.replace(/%\*l%/gi, changeCase.lowerCase(layerName));

  // Title Case
  name = name.replace(/%\*t%/gi, toTitleCase(layerName));
  // name = name.replace(/%\*t%/gi, changeCase.titleCase(layerName))

  // UpperCase First
  name = name.replace(/%\*uf%/gi, changeCase.upperCaseFirst(layerName));

  // Camel Case
  name = name.replace(/%\*c%/gi, changeCase.camelCase(layerName));

  // Layername
  name = name.replace(/%\*/g, layerName);

  return name;
}
github maddox / magic-cards / client / src / utilities / Metadata.js View on Github external
uri = `applemusic/queue/${type}:${itunesID}`

          return {type: type, artURL: artURL, title: title, subtitle: subtitle, uri: uri}
        })

      return metadata
    } else {
      if (sourceURL.pathname.includes('/playlist/')) {
        type = 'playlist'
        title = titleCase(sourceURL.pathname.split('/')[3].replace('-', ' '))
        subtitle = 'Apple Music'
        artURL = ''
      } else if (sourceURL.pathname.includes('/station/')) {
        type = 'station'
        title = titleCase(sourceURL.pathname.split('/')[3].replace('-', ' '))
        subtitle = 'Apple Music'
        artURL = ''
      }

      return {type: type, artURL: artURL, title: title, subtitle: subtitle}
    }
  }
}
github styled-system / styled-system / docs / src / docs.js View on Github external
if (!route) return <pre>not found</pre>
    const Component = route.require()

    return (
      
        
          
            
              
                Home
                
                  /
                
                {titleCase(params.name)}
              
              
            
          
          
            <nav>
          
        
      </nav>
github Thorium-Sim / thorium / src / containers / FlightDirector / Midi / config.js View on Github external
.map(a =&gt; (
                    <option value="{a}">
                      {titleCase(a)}
                    </option>
                  ))}
github reactabular / reactabular / docs / common.js View on Github external
return mapValues(o, (v, k) => ({
    ...v,
    title: titleCase(k),
  }));
}
github netlify / staticgen / static.config.js View on Github external
return pages.map(page => {
    const path = `/${page.key}`
    return { path, name: titleCase(path), ...page }
  })
}
github cucumber / cucumber-js / src / cli / i18n.js View on Github external
const rows = _.map(keywords, keyword => {
    const words = _.map(language[keyword], s => `"${s}"`).join(', ')
    return [titleCase(keyword), words]
  })
  return getAsTable(['ENGLISH KEYWORD', 'NATIVE KEYWORDS'], rows)
github Thorium-Sim / thorium / src / containers / FlightDirector / Midi / config.js View on Github external
const macroAction = config.macros?.find(a =&gt; a.id === selectedAction);

      const macroKey = macroAction ? "macros" : "upMacros";
      const macros = config[macroAction ? "macros" : "upMacros"].map(a =&gt;
        a.id === action.id ? action : a,
      );

      return {config: {...config, [macroKey]: macros}};
    });
  }
  return (
    &lt;&gt;
      <div>
        {selectedComponent ? (
          &lt;&gt;
            <h3>{titleCase(selectedComponent.id)}</h3>
            {allowedActions.length &gt; 1 &amp;&amp; (
              <select value="{actionMode"> {
                  setMidiControl({
                    actionMode: e.target.value,
                  });
                }}
              &gt;
                <option value="nothing" disabled="">
                  Choose an Action Mode
                </option>
                {allowedActions
                  .filter(a =&gt; !excludedActions.includes(a))
                  .map(a =&gt; (</select></div>
github Thorium-Sim / thorium / client / src / components / views / Timeline / missionSelector.js View on Github external
))}
          
        )}
      
      {timelineMode &amp;&amp; (
        <button color="info" size="sm">
            setTimelineMode(
              timelineMode === "standard" ? "classic" : "standard"
            )
          }
        &gt;
          {titleCase(timelineMode)}
        </button>
      )}
    
  );
};
export default MissionSelector;

title-case

Transform a string into title case following English rules

MIT
Latest version published 3 months ago

Package Health Score

88 / 100
Full package analysis

Popular title-case functions