UNPKG

2.2 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.toTypeNameFormat = exports.toTitleFormat = exports.toPascalCase = exports.toPropertyFormat = exports.toStaticPropertyFormat = void 0;
4var util_1 = require("@sap-cloud-sdk/util");
5/**
6 * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead.
7 * Converts a string to the format used by static properties. Use this for serialization.
8 * @param str - The string to be transformed.
9 * @returns The transformed string.
10 */
11function toStaticPropertyFormat(str) {
12 return util_1.upperCaseSnakeCase(str);
13}
14exports.toStaticPropertyFormat = toStaticPropertyFormat;
15/**
16 * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead.
17 * Converts a string to the format used by properties. Use this for serialization.
18 * @param str - The string to be transformed.
19 * @returns The transformed string.
20 */
21function toPropertyFormat(str) {
22 return util_1.camelCase(str);
23}
24exports.toPropertyFormat = toPropertyFormat;
25/**
26 * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead.
27 * Converts a string to PascalCase format e.g. "MyNameInPascalCase".
28 * @param str - The string to be transformed.
29 * @returns The transformed string.
30 */
31function toPascalCase(str) {
32 return util_1.pascalCase(str);
33}
34exports.toPascalCase = toPascalCase;
35/**
36 * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead.
37 * Converts a string to a human readable format, e.g. it transforms `to_BusinessPartner` to `To Business Partner`. Use this for serialization.
38 * @param str - The string to be transformed.
39 * @returns The transformed string.
40 */
41function toTitleFormat(str) {
42 return util_1.titleFormat(str);
43}
44exports.toTitleFormat = toTitleFormat;
45/**
46 * @deprecated Since v1.32.2. Use functions from `@sap-cloud-sdk/util` instead.
47 * Converts a string to the format used by properties. Use this for serialization.
48 * @param str - The string to be transformed.
49 * @returns The transformed string.
50 */
51function toTypeNameFormat(str) {
52 return util_1.pascalCase(str);
53}
54exports.toTypeNameFormat = toTypeNameFormat;
55//# sourceMappingURL=name-converter.js.map
\No newline at end of file