How to use the change-case.pascal 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 TradeMe / tractor / packages / tractor-server / src / api / transformers / component-transformer.js View on Github external
    .then(() => transforms.transformReferenceIdentifiers(oldPath, changeCase.pascal(oldName), changeCase.pascal(newName)))
    .then(() => transforms.transformReferenceIdentifiers(oldPath, changeCase.camel(oldName), changeCase.camel(newName)));
github carbon-design-system / carbon / packages / icon-build-helpers / src / builders / vanilla / builder.js View on Github external
if (prefix !== '') {
    if (!size) {
      if (isGlyph) {
        return prefix + pascal(name) + 'Glyph';
      }
      return prefix + pascal(name);
    }
    return prefix + pascal(name) + size;
  }

  if (!size) {
    if (isGlyph) {
      return pascal(name) + 'Glyph';
    }
    return pascal(name);
  }

  if (isNaN(name[0])) {
    return pascal(name) + size;
  }

  return '_' + pascal(name) + size;
}
github TradeMe / tractor / packages / ui / src / app / Core / Validators / VariableNameValidator.js View on Github external
ngModelController.$validators.variableNameUnique = function (value) {
            var variableName = $scope.$parent.isClass ? pascalcase(value) : camelcase(value);
            var allVariableNames = $scope.allVariableNames();
            var result = !_.contains(allVariableNames, variableName);
            return result;
        };
github carbon-design-system / carbon / packages / icon-build-helpers / src / builders / vanilla / builder.js View on Github external
}
    return prefix + pascal(name) + size;
  }

  if (!size) {
    if (isGlyph) {
      return pascal(name) + 'Glyph';
    }
    return pascal(name);
  }

  if (isNaN(name[0])) {
    return pascal(name) + size;
  }

  return '_' + pascal(name) + size;
}
github TradeMe / tractor / server / api / transformers / component-transformer.js View on Github external
export default function componentTransformer (file, options) {
    let { oldName, newName, oldPath, newPath } = options;

    return transforms.transformIdentifiers(file, pascal(oldName), pascal(newName))
    .then(() => transforms.transformIdentifiers(file, camel(oldName), camel(newName)))
    .then(() => transforms.transformMetadata(file, null, oldName, newName))
    .then(() => transforms.transformReferences('components', oldPath, newPath, oldName, newName))
    .then(() => transforms.transformReferenceIdentifiers(oldPath, pascal(oldName), pascal(newName)))
    .then(() => transforms.transformReferenceIdentifiers(oldPath, camel(oldName), camel(newName)));
}
github fullstack-build / fullstack-one / packages / cli / lib / generate-ts / dbMetaToTsMapper.ts View on Github external
.map((table) => {
      const constraints = table.constraints;
      const tsProperties: string = Object.values(table.columns)
        .map((column) => mapDbMetaColumnToTypescriptProperty(column, constraints, enums))
        .join("\n");
      return `export interface I${pascal(table.name)} {\n${tsProperties}\n}`;
    })
    .join("\n\n");
github 500tech / angular-kick / lib / format.js View on Github external
static toControllerName(name) {
    name = changeCase.pascal(name);
    name = name.replace(/Ctrl$/, 'Controller');

    if (!name.match(/Controller$/)) {
      name += 'Controller';
    }

    return name;
  }
github carbon-design-system / carbon / packages / upgrade / src / migrations / carbon-icons-react / 10.3.0 / update-icon-import-path.js View on Github external
function getModuleName(name, size, prefixParts) {
  const prefix = prefixParts
    .filter(size => isNaN(size))
    .map(pascal)
    .join('');

  if (prefix !== '') {
    if (!size) {
      return prefix + pascal(name) + 'Glyph';
    }
    return prefix + pascal(name) + size;
  }

  if (!size) {
    return pascal(name) + 'Glyph';
  }

  if (isNaN(name[0])) {
    return pascal(name) + size;
  }

  return '_' + pascal(name) + size;
}
github 0xProject / 0x-monorepo / packages / abi-gen / src / python_handlebars_helpers.ts View on Github external
        (sourceName: string) => new Handlebars.SafeString(changeCase.pascal(sourceName)),
    );
github artyorsh / react-native-eva-icons / scripts / src / generate.ts View on Github external
iconFiles.forEach((file: string) => {
    const sourceFilePath: string = path.resolve(sourceDir, file);

    const fileName: string = pascal(getFileNameFromPath(sourceFilePath));
    const destFilePath: string = path.resolve(destDir, `${fileName}.tsx`);

    const reactNativeSvgSource: string = createReactNativeSvgSource(sourceFilePath);

    fs.writeFileSync(destFilePath, reactNativeSvgSource);
  });
}