How to use the change-case.titleCase function in change-case

To help you get started, we’ve selected a few change-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 Thorium-Sim / thorium / src / containers / FlightDirector / SimulatorConfig / config / Stations / StationConfig.js View on Github external
const addCard = e => {
    let sampleName = e.target.value;
    if (sampleName.indexOf("software-panel-") > -1) {
      const panel = softwarePanels.find(
        i => i.id === sampleName.replace("software-panel-", ""),
      );
      sampleName = panel ? panel.name : sampleName;
    }
    if (sampleName.indexOf("interface-id:-") > -1) {
      const int = interfaces.find(
        i => i.id === sampleName.replace("interface-id:", ""),
      );
      sampleName = int ? int.name : sampleName;
    }
    let name = prompt("What is the card name?", titleCase(sampleName));
    const cardComponent = e.target.value;
    if (name) {
      const variables = {
        id: selectedStationSet,
        name: station.name,
        cardName: name,
        cardComponent,
      };
      client.mutate({
        mutation: ops.addCard,
        variables,
      });
    }
  };
  const toggleStationMessageGroup = (evt, group) => {
github taskcluster / taskcluster-tools / src / views / WorkerManager / WorkerTable.jsx View on Github external
);
    const tasksToRender = this.tasksToRender();
    const { filterStatus } = this.state;

    return (
      <div>
        <hr>
        <h5>Recent Task IDs claimed</h5>
        <table>
          <thead>
            <tr>
              <th>
                
                  
                    <menuitem>All</menuitem>
                    <menuitem>
                    {groups.map(group =&gt; (
                      <menuitem>
                        {titleCase(group)}
                      </menuitem>
                    ))}
                  </menuitem>
                
              </th>
              <th>Name</th>
              <th>Task ID</th></tr></thead></table></div>
github Thorium-Sim / thorium / client / src / components / views / Records / records.js View on Github external
{filterOptions.map(c =&gt; (
               toggleFilter(c)}
              &gt;
                {titleCase(c)}
              
            ))}
github danielbrodin / atom-project-manager / lib / views / EditView.js View on Github external
render() {
    const defaultProps = Project.defaultProps;
    const rootPath = atom.project.getPaths()[0];
    let props = { ...defaultProps, title: path.basename(rootPath) };

    if (atom.config.get('project-manager.prettifyTitle')) {
      props.title = changeCase.titleCase(path.basename(rootPath));
    }

    if (this.props.project && this.props.project.source === 'file') {
      const projectProps = this.props.project.getProps();
      props = Object.assign({}, props, projectProps);
    }

    const wrapperStyle = {
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'center',
    };

    const style = {
      width: '500px',
    };
github types / _generator-typings / generators / beta / index.js View on Github external
this.fs.copyTpl(
        this.templatePath('template/typings.json'),
        this.destinationPath('typings.json'),
        {
          name: this.props.sourceDeliveryPackageName,
          main: this.props.sourceMain,
          homepage: this.props.sourceHomepage,
          version: this.props.sourceVersion
        });

      this.fs.copyTpl(
        this.templatePath('template/README.md'),
        this.destinationPath('README.md'),
        {
          prettyPackageName: changeCase.titleCase(this.props.sourceDeliveryPackageName.replace('-', ' ')),
          sourcePackageName: this.props.sourceDeliveryPackageName,
          sourcePackageUrl: this.props.sourceRepository,
          organization: this.props.repositoryOrganization,
          packageName: this.props.repositoryName,
          license: this.props.license,
          generatorVersion: GENERATORVERSION
        });


      this.fs.copyTpl(
        this.templatePath('template/package.json'),
        this.destinationPath('package.json'),
        {
          ambient: !(~this.props.sourceUsages.indexOf('commonjs') ||
            ~this.props.sourceUsages.indexOf('amd') ||
            ~this.props.sourceUsages.indexOf('esm')) ? ' --ambient' : '',
github Thorium-Sim / thorium / src / components / core / layouts / dynamic / index.js View on Github external
renderTile={(id, path) =&gt; {
        return (
          
              ) : (
                titleCase(id)
              )
            }
            toolbarControls={[
              ,
              ,
              ,
            ]}
            createNode={e =&gt; e}
          &gt;
            {(() =&gt; {
              if (id &amp;&amp; id.indexOf("Picker") &gt; -1) {
                return (
                  
                );
              }
              const Comp = Cores[id] || (() =&gt; null);
github Thorium-Sim / thorium / client / src / components / views / SubspaceField / subspaceField.js View on Github external
{action =&gt; (
                
                    this.setState({ [s]: Math.abs(1 - level) })
                  }
                  mouseUp={level =&gt;
                    action({
                      variables: {
                        id,
                        which: s,
                        value: Math.round(100 * level)
                      }
github Thorium-Sim / thorium / src / components / views / CoreFeed / config.js View on Github external
checked={allowed[c] || false}
                    onChange={() =&gt;
                      this.setState(
                        state =&gt; ({
                          allowed: {...state.allowed, [c]: !state.allowed[c]},
                        }),
                        () =&gt; {
                          localStorage.setItem(
                            "allowed_coreFeed",
                            JSON.stringify(this.state.allowed),
                          );
                        },
                      )
                    }
                  /&gt;{" "}
                  {titleCase(c.replace("Core", ""))}
                
              
            ))}
github Thorium-Sim / thorium / src / containers / FlightDirector / SimulatorConfig / SimulatorProperties.js View on Github external
{properties.map(p =&gt; (
        <li> {
            selectProperty(p);
          }}
          className={`list-group-item ${
            selectedProperty === p ? "selected" : ""
          }`}
        &gt;
          {titleCase(p)}
        </li>
      ))}