How to use the change-case.ucFirst 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 maximilianschmitt / ng-autobootstrap / lib / bootstrap-file-contents.js View on Github external
Object.keys(moduleMap).forEach(function(moduleType) {
		var filePaths = moduleMap[moduleType];
		if (filePaths.length < 1) {
			return;
		}

		contents += '	// ' + changeCase.ucFirst(moduleType) + 's\n';

		filePaths.forEach(function(file) {
			var moduleName = file.name;
			var modulePath = file.path.replace('\\', '/');

			contents += '	app.' + moduleType + '(';

			// precede animations with a `.`
			if (moduleType === 'animation') {
				moduleName = '.' + moduleName;
			}

			// config modules don't have a name
			if (moduleType !== 'config') {
				contents += '\'' + moduleName + '\', ';
			}
github Shopify / graphql-tools-web / packages / graphql-typescript-definitions / src / print / document / context.ts View on Github external
get typeName() {
    let typeName: string;

    if (isOperation(this.operation)) {
      const {operationName, operationType} = this.operation;
      typeName = `${ucFirst(operationName)}${ucFirst(operationType)}Data`;
    } else {
      const {fragmentName} = this.operation;
      typeName = `${ucFirst(fragmentName)}FragmentData`;
    }

    return this.options.partial
      ? typeName.replace(/Data$/, 'PartialData')
      : typeName;
  }
github claudetech / js-change-object-case / dist / change-object-case.js View on Github external
function exportTransformation(name) {
  var f = changeCase[name];
  module.exports[name + 'Keys'] = makeObjectTransformation(f);
  module.exports[name + 'Array'] = makeArrayTransformation(f);
  module.exports['to' + changeCase.ucFirst(name)] = makeArbitraryDataTransformation(f);
}
github claudetech / js-change-object-case / index.js View on Github external
function exportTransformation(name) {
  var f = changeCase[name];
  module.exports[name + 'Keys'] = makeObjectTransformation(f);
  module.exports[name + 'Array'] = makeArrayTransformation(f);
  module.exports['to' + changeCase.ucFirst(name)] = makeArbitraryDataTransformation(f);
}
github Shopify / graphql-tools-web / packages / graphql-typescript-definitions / src / print / document / context.ts View on Github external
get typeName() {
    let typeName: string;

    if (isOperation(this.operation)) {
      const {operationName, operationType} = this.operation;
      typeName = `${ucFirst(operationName)}${ucFirst(operationType)}Data`;
    } else {
      const {fragmentName} = this.operation;
      typeName = `${ucFirst(fragmentName)}FragmentData`;
    }

    return this.options.partial
      ? typeName.replace(/Data$/, 'PartialData')
      : typeName;
  }
github Shopify / graphql-tools-web / packages / graphql-typescript-definitions / src / print / document / utilities.ts View on Github external
get name(): string {
    const {parent, field, isFragment, type} = this;
    const fieldName = field ? ucFirst(field.responseName) : '';
    const name = `${parent ? parent.name : ''}${fieldName}`;
    return isFragment ? `${name}${type ? type.name : 'Other'}` : name;
  }