UNPKG

@sap-cloud-sdk/core

Version:
55 lines 2.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toTypeNameFormat = exports.toTitleFormat = exports.toPascalCase = exports.toPropertyFormat = exports.toStaticPropertyFormat = void 0; var util_1 = require("@sap-cloud-sdk/util"); /** * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead. * Converts a string to the format used by static properties. Use this for serialization. * @param str - The string to be transformed. * @returns The transformed string. */ function toStaticPropertyFormat(str) { return (0, util_1.upperCaseSnakeCase)(str); } exports.toStaticPropertyFormat = toStaticPropertyFormat; /** * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead. * Converts a string to the format used by properties. Use this for serialization. * @param str - The string to be transformed. * @returns The transformed string. */ function toPropertyFormat(str) { return (0, util_1.camelCase)(str); } exports.toPropertyFormat = toPropertyFormat; /** * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead. * Converts a string to PascalCase format e.g. "MyNameInPascalCase". * @param str - The string to be transformed. * @returns The transformed string. */ function toPascalCase(str) { return (0, util_1.pascalCase)(str); } exports.toPascalCase = toPascalCase; /** * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead. * Converts a string to a human readable format, e.g. it transforms `to_BusinessPartner` to `To Business Partner`. Use this for serialization. * @param str - The string to be transformed. * @returns The transformed string. */ function toTitleFormat(str) { return (0, util_1.titleFormat)(str); } exports.toTitleFormat = toTitleFormat; /** * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead. * Converts a string to the format used by properties. Use this for serialization. * @param str - The string to be transformed. * @returns The transformed string. */ function toTypeNameFormat(str) { return (0, util_1.pascalCase)(str); } exports.toTypeNameFormat = toTypeNameFormat; //# sourceMappingURL=name-converter.js.map