How to use the camelcase.default function in camelcase

To help you get started, we’ve selected a few camelcase 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 MMF-FE / vue-svgicon / dist / lib / build.js View on Github external
files.forEach(function (file) {
        var name = path.basename(file).split('.')[0];
        var filePath = getFilePath(opts.sourcePath, file, subDir);
        var dir = filePath.split('/')[0];
        if (dir) {
            if (!dirMap[dir]) {
                dirMap[dir] = [];
                if (shouldExport) {
                    var dirName = camelcase_1.default(dir, {
                        pascalCase: true
                    });
                    content += isES6
                        ? "export * as  " + dirName + " from './" + dir + "'\n"
                        : "module.exports." + dirName + " = require('./" + dir + "')\n";
                }
                else {
                    content += isES6
                        ? "import './" + dir + "'\n"
                        : "require('./" + dir + "')\n";
                }
            }
            dirMap[dir].push(file);
        }
        else {
            if (shouldExport) {
github aws / jsii / packages / codemaker / lib / case-utils.ts View on Github external
export function toPascalCase(...args: string[]): string {
  return camelcase(args, { pascalCase: true });
}
github MMF-FE / vue-svgicon / dist / lib / build.js View on Github external
});
                    content += isES6
                        ? "export * as  " + dirName + " from './" + dir + "'\n"
                        : "module.exports." + dirName + " = require('./" + dir + "')\n";
                }
                else {
                    content += isES6
                        ? "import './" + dir + "'\n"
                        : "require('./" + dir + "')\n";
                }
            }
            dirMap[dir].push(file);
        }
        else {
            if (shouldExport) {
                var fileName = camelcase_1.default(name, {
                    pascalCase: true
                });
                content += isES6
                    ? "export " + fileName + " from './" + filePath + name + "'\n"
                    : "module.exports." + fileName + " = require('./" + filePath + name + "')\n";
            }
            else {
                content += isES6
                    ? "import './" + filePath + name + "'\n"
                    : "require('./" + filePath + name + "')\n";
            }
        }
    });
    fs.writeFileSync(path.join(opts.targetPath, subDir, "index." + opts.ext), content, 'utf-8');
github aws / jsii / packages / jsii-pacmak / lib / targets / dotnet / nameutils.ts View on Github external
public convertParameterName(original: string) {
    if (this.isInvalidName(original)) {
      throw new Error(`Invalid parameter name: ${original}`);
    }
    const name = camelcase(original);
    return this.escapeParameterName(name);
  }
github aws / jsii / packages / codemaker / lib / case-utils.ts View on Github external
export function toCamelCase(...args: string[]): string {
  return camelcase(args);
}

camelcase

Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`

MIT
Latest version published 1 year ago

Package Health Score

73 / 100
Full package analysis

Popular camelcase functions