How to use the title function in title

To help you get started, we’ve selected a few title 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 atomiclabs / hyperdex / app / renderer / views / Settings / Export.js View on Github external
const rows = swaps.map(swap => [
		formatDate(swap.timeStarted, 'YYYY-MM-DD HH:mm:ss'), // The most Excel compatible datetime format
		`${swap.baseCurrency}/${swap.quoteCurrency}`,
		title(swap.orderType),
		`${swap.baseCurrencyAmount} ${swap.baseCurrency}`,
		`${swap.quoteCurrencyAmount} ${swap.quoteCurrency}`,
		title(swap.statusFormatted),
		getTXID(swap, 'myfee'),
		getTXID(swap, 'alicepayment'),
		getTXID(swap, 'alicespend'),
	]);
github atomiclabs / hyperdex / app / renderer / touch-bar.js View on Github external
const updateTouchBar = () => {
	portfolioValue.label = `${appContainer.state.portfolio.name}: ${dashboardContainer.assetCount}${dashboardContainer.totalAssetValueFormatted}`;

	const swap = getLatestSwap();
	latestSwap.label = swap ? `${swap.baseCurrency}/${swap.quoteCurrency} ${t(`details.${swap.orderType}`)} ${t('details.order')}: ${title(swap.statusFormatted)}` : '';

	latestSwap.textColor = swap ? (
		(swap.status === 'completed' && '#28af60' /* => var(--success-color) */) ||
		(swap.status === 'failed' && '#f80759' /* => var(--error-color) */)
	) : null;
};
github zeit / now / packages / now-cli / src / util / output / builds.js View on Github external
const prepareState = state => title(state.replace('_', ' '));
github twilio-labs / twilio-run / src / printers / list.ts View on Github external
let content = '';
  if (sectionTitle === 'builds') {
    content = (sectionContent as BuildResource[])
      .map(prettyPrintBuilds)
      .join(`\n\n`);
  } else if (sectionTitle === 'environments') {
    content = (sectionContent as EnvironmentResource[])
      .map(prettyPrintEnvironment)
      .join('\n\n');
  } else if (sectionTitle === 'services') {
    content = (sectionContent as ServiceResource[])
      .map(prettyPrintServices)
      .join('\n\n');
  } else if (sectionTitle === 'variables') {
    const data = sectionContent as VariablesContent;
    sectionHeader = chalk`{cyan.bold ${title(
      sectionTitle
    )}} {dim for environment ${data.environmentSid}}`;
    content = prettyPrintVariables(data);
  } else if (sectionTitle === 'functions' || sectionTitle === 'assets') {
    const data = sectionContent as FunctionOrAssetContent;
    sectionHeader = chalk`{cyan.bold ${title(
      sectionTitle
    )}} {dim for environment ${data.environmentSid}}`;
    content = prettyPrintFunctionsOrAssets(data);
  }
  const output = stripIndent`
    ${sectionHeader}\n\n${content}\n\n\n
  `;
  return output;
}
github zeit / title-site / pages / index.js View on Github external
const { value } = event.target
    const input = this.handler.input
    const idx = input.selectionStart
    const { replacingWithPaste } = this.state
    const caretPosition = () => {
      if (replacingWithPaste) {
        input.selectionStart = 0
        input.selectionEnd = input.value.length
      } else {
        input.selectionStart = input.selectionEnd = idx
      }
    }
    
    this.setState({
      replacingWithPaste: false,
      value: toTitle(value)
    }, caretPosition)

    event.preventDefault()
  }
github zeit / now / packages / now-cli / src / commands / deploy / legacy.ts View on Github external
`Do you mean ${code('build')} (object) with a property ${code(
            'env'
          )} (object) instead of ${code(prop)}?`
        );
      }

      return 1;
    }

    if (keyword === 'type') {
      const prop = dataPath.substr(1, dataPath.length);

      output.error(
        `The property ${code(prop)} in ${highlight(
          'now.json'
        )} can only be of type ${code(title(params.type))}.`
      );

      return 1;
    }

    output.error(
      `Failed to validate ${highlight(
        'now.json'
      )}: ${message}\nDocumentation: ${
        link('https://zeit.co/docs/v2/advanced/configuration')
      }`
    );

    return 1;
  }
  if (error instanceof TooManyRequests) {
github BeeDesignLLC / GlutenProject.com / components / Layout.js View on Github external
render() {
    const {
      children,
      title = 'The Gluten Project',
      description,
      router,
      searchState,
      searchResults,
    } = this.props

    const htmlTitle = searchState.query
      ? `${searchResults && searchResults.nbHits} Certified Gluten-Free ${titleize(
          searchState.query
        )} (safe for Celiac) | The Gluten Project`
      : title

    const htmlDescription = searchState.query
      ? `We've compiled the entire list of all certified gluten-free ${
          searchState.query
        } products in one place. Additionally, we have where to buy the product, ingredient lists, and reviews. This is your one-stop shop for everything gluten-free.`
      : description

    const socialTitle = htmlTitle.replace(/ \| The Gluten Project$/, '')

    return (
github zeit / now / packages / now-cli / src / commands / deploy / legacy.ts View on Github external
`Do you mean ${code('build')} (object) with a property ${code(
            'env'
          )} (object) instead of ${code(prop)}?`
        );
      }

      return 1;
    }

    if (keyword === 'type') {
      const prop = dataPath.substr(1, dataPath.length);

      output.error(
        `The property ${code(prop)} in ${highlight(
          'now.json'
        )} can only be of type ${code(title(params.type))}.`
      );

      return 1;
    }

    output.error(
      `Failed to validate ${highlight(
        'now.json'
      )}: ${message}\nDocumentation: ${link(
        'https://zeit.co/docs/v2/advanced/configuration'
      )}`
    );

    return 1;
  }
  if (error instanceof TooManyRequests) {
github leerob / leerob.io / utils / title-style.js View on Github external
export default (text) =>
    title(text, {
        special: [
            '1Password',
            'About',
            'API',
            'APIs',
            'CircleCI',
            'CSS',
            'dart_dev',
            'GraphQL',
            'HDD',
            'iPhone',
            'iTerm',
            'MDX',
            'OverReact',
            'QC35',
            'UI',

title

Capitalize your titles properly

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis