How to use the change-case.pascalCase 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 wechatpivot / wechatpivot / tasks / vue / route.js View on Github external
routes[routes.length - 3] = routes[routes.length - 3];
routes.splice(
  routes.length - 2,
  0,
  routesTemplate
    .replace(/{{routeName}}/g, changeCase.camelCase(routeName))
    .replace(/{{RouteName}}/g, changeCase.pascalCase(routeName))
    .replace(/\n$/, '')
);

fs.writeFileSync(
  path.join(__dirname, `../../app/src/components/${routeName}View.vue`),
  routeTemplate
    .replace(/{{routeName}}/g, changeCase.camelCase(routeName))
    .replace(/{{RouteName}}/g, changeCase.pascalCase(routeName))
)

fs.mkdirSync(path.join(__dirname, `../../app/src/components/${routeName}View`));

fs.writeFileSync(
  path.join(__dirname, `../../app/src/components/${routeName}View/styles.css`),
  ''
);

fs.writeFileSync(
  path.join(__dirname, '../../app/src/routes.js'),
  routes.join('\n')
)

console.log(`\n\x1b[33m[vue]\x1b[0m  route "${routeName}" has been created`)
console.log('  [ \n' + [
github iyegoroff / make-react-native-package / index.js View on Github external
const copyTemplates = async (src, map, name) => {
  const options = copyOptions(map)

  await copy(`${androidSourcesPath}/${src}`, `${androidSourcesPath}/${packageCase(name)}`, options)

  await copy(`${iosSourcesPath}/${src}`, `${iosSourcesPath}/${pascalCase(name)}`, options)

  await copy(
    `${typescriptSourcesPath}/${src}`,
    `${typescriptSourcesPath}/${pascalCase(name)}`,
    options
  )
}
github cevr / arranger / scripts / rollup.config.js View on Github external
import path from 'path'
import nodeResolve from 'rollup-plugin-node-resolve'
import babel from 'rollup-plugin-babel'
import replace from 'rollup-plugin-replace'
import commonjs from 'rollup-plugin-commonjs'
import external from '@yelo/rollup-node-external'
import { terser } from 'rollup-plugin-terser'
import { pascalCase } from 'change-case'

const { PACKAGES_SRC_DIR, PACKAGES_OUT_DIR } = require('./getPackageNames')

const packageName = process.env.PACKAGE_NAME

const libraryName = pascalCase(packageName)

const input = `./${path.join(PACKAGES_SRC_DIR, 'index.js')}`

const outDir = path.join(PACKAGES_OUT_DIR, 'dist')

const getBabelOptions = ({ useESModules }) => ({
    exclude: 'node_modules/**',
    runtimeHelpers: true,
    plugins: [['@babel/transform-runtime', { useESModules }]],
})

export default [
    {
        input,
        output: {
            file: `${outDir}/${libraryName}.umd.js`,
github jhwoodward / neo4j-graphQL / app / api / picture.js View on Github external
var getList = function(q,options) {

    if (options){
        if (options.pageSize){
            options.pageSize = parseInt(options.pageSize);
        }
        if (options.pageNum){
            options.pageNum = parseInt(options.pageNum);
        }
        if (options.sort && options.sort != "created"){
            options.sort = changeCase.pascalCase(options.sort);
        }
    }
    
    var defaults = {
        pageNum:1,
        pageSize:20,
        sort:"created",
        sortOrder:"DESC"
    };
    
    options = _.extend(defaults,options);

    var startIndex = (options.pageNum-1) * options.pageSize;
    var endIndex = startIndex + options.pageSize;

    var query = q + "  return p,ID(p),LABELS(p),i,ID(i)";
github hyk51594176 / mcommon / rollup.config.js View on Github external
import babel from 'rollup-plugin-babel'
import uglify from 'rollup-plugin-uglify'
import createBanner from 'create-banner'
import changeCase from 'change-case'
import alias from 'rollup-plugin-alias'
import path from 'path'
const resolve = p => path.resolve(__dirname, p)
const pkg = require('./package')
const name = changeCase.pascalCase(pkg.name.replace('@hanyk/', ''))
const banner = createBanner({
  data: {
    name: `${name}.js`,
    year: '2018-present'
  }
})
export default {
  input: 'src/index.js',
  output: {
    banner,
    file: 'dist/index.js',
    format: 'umd',
    name: 'mcommon',
    globals: {
      'Sortable': 'Sortable'
    }
github apollographql / apollo-tooling / packages / apollo-codegen-scala / src / naming.ts View on Github external
export function traitNameForFragmentName(fragmentName: string) {
  return pascalCase(fragmentName);
}
github aws-amplify / amplify-cli / packages / amplify-graphql-types-generator / src / scala / naming.js View on Github external
export function caseClassNameForInlineFragment(inlineFragment) {
  return 'As' + pascalCase(String(inlineFragment.typeCondition));
}
github apollographql / apollo-tooling / src / swift / naming.js View on Github external
export function structNameForInlineFragment(inlineFragment) {
  return 'As' + pascalCase(String(inlineFragment.typeCondition));
}
github apollographql / apollo-tooling / src / swift / naming.js View on Github external
export function structNameForFragmentName(fragmentName) {
  return pascalCase(fragmentName);
}