How to use the title-case.titleCase 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 ctrlplusb / easy-peasy / rollup.config.js View on Github external
produce(config, draft => {
    draft.external.splice(draft.external.indexOf('shallowequal'), 1);
    draft.output.format = 'umd';
    draft.output.globals = {
      debounce: 'debounce',
      'is-plain-object': 'isPlainObject',
      memoizerific: 'memoizerific',
      'redux-thunk': 'ReduxThunk',
      'immer-peasy': 'produce',
      react: 'React',
      redux: 'Redux',
    };
    draft.output.name = titleCase(packageJson.name.replace(/-/g, ' ')).replace(
      / /g,
      '',
    );
    draft.plugins.push(fileSize(), resolve(), commonjs());
  });
github opencollective / opencollective-frontend / components / expenses / ExpenseDetails.js View on Github external
const expenseTypesOptions = Object.entries(expenseTypes).map(([key, value]) => {
      return { [key]: titleCase(value) };
    });
github Urigo / SOFA / src / open-api / operations.ts View on Github external
function resolveDescription(
  schema: GraphQLSchema,
  operation: OperationDefinitionNode
) {
  const selection = operation.selectionSet.selections[0] as FieldNode;
  const fieldName = selection.name.value;
  const typeDefinition = schema.getType(titleCase(operation.operation));

  if (!typeDefinition) {
    return '';
  }

  const definitionNode =
    typeDefinition.astNode || parse(printType(typeDefinition)).definitions[0];

  if (!isObjectTypeDefinitionNode(definitionNode)) {
    return '';
  }

  const fieldNode = definitionNode.fields!.find(
    field => field.name.value === fieldName
  );
  const descriptionDefinition = fieldNode && fieldNode.description;
github smartcontractkit / chainlink / explorer / client / src / components / KeyValueList.tsx View on Github external
const renderKey = (k: string, titleize: boolean) =>
  titleize ? titleCase(noCase(k)) : k
github opencollective / opencollective-frontend / components / expenses / CreateExpenseForm.js View on Github external
this.expenseTypes = Object.entries(expenseTypes).map(([key, value]) => {
      return { [key]: titleCase(value) };
    });
github andrglo / koa-swagger-router / src / index.js View on Github external
constructor(options) {
    options = options || {}
    const spec = options.spec
    const dirname = options.__dirname
    const pack = require(findUp('package.json', {
      cwd: dirname || path.dirname(module.parent.filename)
    }))
    const it = {}
    it.spec = extend(
        {
          swagger: '2.0',
          info: {
            title: titleCase(pack.name),
            description: pack.description,
            version: pack.version,
            contact: {
              name: pack.author && pack.author.name
            },
            license: {
              name: pack.private === true ? 'Proprietary' : pack.license
            }
          },
          produces: ['application/json', 'text/plain; charset=utf-8'],
          schemes: ['https'],
          securityDefinitions: {
            internalApiKey: {
              type: 'apiKey',
              name: 'api_key',
              in: 'header'
github smartcontractkit / chainlink / operator_ui / src / components / KeyValueList.tsx View on Github external
const renderKey = (k: string, titleize: boolean) =>
  titleize ? titleCase(noCase(k)) : k
github yuanqing / create-figma-plugin / packages / create-figma-plugin / src / prompt-for-user-input.js View on Github external
default: function (values) {
        return titleCase(
          (typeof name === 'undefined' ? values.name : name).replace(
            figmaPrefixRegex,
            ''
          )
        )
      },
      validate,
github andrglo / koa-swagger-router / src / index.js View on Github external
constructor(spec, path, method, parent) {
    const match = path.match(/^\/(\w*)\/?/)
    let prefix
    assert(
        match && (prefix = match[1]),
        `Path ${path} should be int format /path or /path/anything`
    )

    Object.assign(spec, {
      tags: [prefix],
      summary: titleCase(`${method} ${prefix}`),
      description: '',
      responses: Object.assign({}, onSuccess[0], onError[0]),
      security: [{internalApiKey: []}]
    })

    methodsData.set(this, {spec, onSuccess, onError, parent})
  }

title-case

Transform a string into title case following English rules

MIT
Latest version published 3 months ago

Package Health Score

84 / 100
Full package analysis

Popular title-case functions