UNPKG

graphql-codegen-core

Version:

GraphQL types and code generator based on schema

11 lines 483 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var change_case_1 = require("change-case"); function toPascalCase(str) { if (str.charAt(0) === '_') { return str.replace(/^(_*)(.*)/, function (_match, underscorePrefix, typeName) { return "" + underscorePrefix + change_case_1.pascalCase(typeName || ''); }); } return change_case_1.pascalCase(str || ''); } exports.toPascalCase = toPascalCase; //# sourceMappingURL=to-pascal-case.js.map