caseparser 4.1.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -55,23 +55,61 @@ type DotToSnake<T extends string> = DashToSnake<DotToDash<T>>;
55
55
  type DotToTrain<T extends string> = DashToTrain<DotToDash<T>>;
56
56
  type DotToUpperDash<T extends string> = Uppercase<DotToDash<T>>;
57
57
  type DotToUpperSnake<T extends string> = DashToUpperSnake<DotToDash<T>>;
58
- type ParserCamelType = "CamelToDash" | "CamelToPascal" | "CamelToSnake" | "CamelToUpperDash" | "CamelToUpperSnake" | "CamelToTrain" | "CamelToDot";
59
- type ParserDashType = "DashToCamel" | "DashToPascal" | "DashToSnake" | "DashToUpperDash" | "DashToUpperSnake" | "DashToTrain" | "DashToDot";
60
- type ParserPascalType = "PascalToCamel" | "PascalToDash" | "PascalToSnake" | "PascalToUpperDash" | "PascalToUpperSnake" | "PascalToTrain" | "PascalToDot";
61
- type ParserSnakeType = "SnakeToCamel" | "SnakeToDash" | "SnakeToPascal" | "SnakeToUpperDash" | "SnakeToUpperSnake" | "SnakeToTrain" | "SnakeToDot";
62
- type ParserUpperDashType = "UpperDashToCamel" | "UpperDashToDash" | "UpperDashToPascal" | "UpperDashToSnake" | "UpperDashToUpperSnake" | "UpperDashToTrain" | "UpperDashToDot";
63
- type ParserUpperSnakeType = "UpperSnakeToCamel" | "UpperSnakeToDash" | "UpperSnakeToPascal" | "UpperSnakeToSnake" | "UpperSnakeToUpperDash" | "UpperSnakeToTrain" | "UpperSnakeToDot";
64
- type ParserTrainType = "TrainToCamel" | "TrainToDash" | "TrainToDot" | "TrainToPascal" | "TrainToSnake" | "TrainToUpperDash" | "TrainToUpperSnake";
65
- type ParserDotType = "DotToCamel" | "DotToDash" | "DotToPascal" | "DotToSnake" | "DotToTrain" | "DotToUpperDash" | "DotToUpperSnake";
58
+ type DashToWords<T extends string> = T extends `${infer L}-${infer R}` ? `${L} ${DashToWords<R>}` : T;
59
+ type WordsToDash<T extends string> = T extends `${infer L} ${infer R}` ? `${L}-${WordsToDash<R>}` : T;
60
+ type DashToTitle<T extends string> = T extends `${infer L}-${infer R}` ? `${Capitalize<L>} ${DashToTitle<R>}` : Capitalize<T>;
61
+ type DashToSentence<T extends string> = Capitalize<DashToWords<T>>;
62
+ type CamelToTitle<T extends string> = DashToTitle<CamelToDash<T>>;
63
+ type CamelToSentence<T extends string> = DashToSentence<CamelToDash<T>>;
64
+ type PascalToTitle<T extends string> = DashToTitle<PascalToDash<T>>;
65
+ type PascalToSentence<T extends string> = DashToSentence<PascalToDash<T>>;
66
+ type SnakeToTitle<T extends string> = DashToTitle<SnakeToDash<T>>;
67
+ type SnakeToSentence<T extends string> = DashToSentence<SnakeToDash<T>>;
68
+ type UpperSnakeToTitle<T extends string> = DashToTitle<UpperSnakeToDash<T>>;
69
+ type UpperSnakeToSentence<T extends string> = DashToSentence<UpperSnakeToDash<T>>;
70
+ type UpperDashToTitle<T extends string> = DashToTitle<UpperDashToDash<T>>;
71
+ type UpperDashToSentence<T extends string> = DashToSentence<UpperDashToDash<T>>;
72
+ type TrainToTitle<T extends string> = DashToTitle<TrainToDash<T>>;
73
+ type TrainToSentence<T extends string> = DashToSentence<TrainToDash<T>>;
74
+ type DotToTitle<T extends string> = DashToTitle<DotToDash<T>>;
75
+ type DotToSentence<T extends string> = DashToSentence<DotToDash<T>>;
76
+ type TitleToDash<T extends string> = WordsToDash<Lowercase<T>>;
77
+ type TitleToCamel<T extends string> = DashToCamel<TitleToDash<T>>;
78
+ type TitleToPascal<T extends string> = DashToPascal<TitleToDash<T>>;
79
+ type TitleToSnake<T extends string> = DashToSnake<TitleToDash<T>>;
80
+ type TitleToUpperSnake<T extends string> = DashToUpperSnake<TitleToDash<T>>;
81
+ type TitleToUpperDash<T extends string> = DashToUpperDash<TitleToDash<T>>;
82
+ type TitleToTrain<T extends string> = DashToTrain<TitleToDash<T>>;
83
+ type TitleToDot<T extends string> = DashToDot<TitleToDash<T>>;
84
+ type TitleToSentence<T extends string> = DashToSentence<TitleToDash<T>>;
85
+ type SentenceToDash<T extends string> = WordsToDash<Lowercase<T>>;
86
+ type SentenceToCamel<T extends string> = DashToCamel<SentenceToDash<T>>;
87
+ type SentenceToPascal<T extends string> = DashToPascal<SentenceToDash<T>>;
88
+ type SentenceToSnake<T extends string> = DashToSnake<SentenceToDash<T>>;
89
+ type SentenceToUpperSnake<T extends string> = DashToUpperSnake<SentenceToDash<T>>;
90
+ type SentenceToUpperDash<T extends string> = DashToUpperDash<SentenceToDash<T>>;
91
+ type SentenceToTrain<T extends string> = DashToTrain<SentenceToDash<T>>;
92
+ type SentenceToDot<T extends string> = DashToDot<SentenceToDash<T>>;
93
+ type SentenceToTitle<T extends string> = DashToTitle<SentenceToDash<T>>;
94
+ type ParserCamelType = "CamelToDash" | "CamelToPascal" | "CamelToSnake" | "CamelToUpperDash" | "CamelToUpperSnake" | "CamelToTrain" | "CamelToDot" | "CamelToTitle" | "CamelToSentence";
95
+ type ParserDashType = "DashToCamel" | "DashToPascal" | "DashToSnake" | "DashToUpperDash" | "DashToUpperSnake" | "DashToTrain" | "DashToDot" | "DashToTitle" | "DashToSentence";
96
+ type ParserPascalType = "PascalToCamel" | "PascalToDash" | "PascalToSnake" | "PascalToUpperDash" | "PascalToUpperSnake" | "PascalToTrain" | "PascalToDot" | "PascalToTitle" | "PascalToSentence";
97
+ type ParserSnakeType = "SnakeToCamel" | "SnakeToDash" | "SnakeToPascal" | "SnakeToUpperDash" | "SnakeToUpperSnake" | "SnakeToTrain" | "SnakeToDot" | "SnakeToTitle" | "SnakeToSentence";
98
+ type ParserUpperDashType = "UpperDashToCamel" | "UpperDashToDash" | "UpperDashToPascal" | "UpperDashToSnake" | "UpperDashToUpperSnake" | "UpperDashToTrain" | "UpperDashToDot" | "UpperDashToTitle" | "UpperDashToSentence";
99
+ type ParserUpperSnakeType = "UpperSnakeToCamel" | "UpperSnakeToDash" | "UpperSnakeToPascal" | "UpperSnakeToSnake" | "UpperSnakeToUpperDash" | "UpperSnakeToTrain" | "UpperSnakeToDot" | "UpperSnakeToTitle" | "UpperSnakeToSentence";
100
+ type ParserTrainType = "TrainToCamel" | "TrainToDash" | "TrainToDot" | "TrainToPascal" | "TrainToSnake" | "TrainToUpperDash" | "TrainToUpperSnake" | "TrainToTitle" | "TrainToSentence";
101
+ type ParserDotType = "DotToCamel" | "DotToDash" | "DotToPascal" | "DotToSnake" | "DotToTrain" | "DotToUpperDash" | "DotToUpperSnake" | "DotToTitle" | "DotToSentence";
102
+ type ParserTitleType = "TitleToCamel" | "TitleToPascal" | "TitleToSnake" | "TitleToDash" | "TitleToUpperSnake" | "TitleToUpperDash" | "TitleToTrain" | "TitleToDot" | "TitleToSentence";
103
+ type ParserSentenceType = "SentenceToCamel" | "SentenceToPascal" | "SentenceToSnake" | "SentenceToDash" | "SentenceToUpperSnake" | "SentenceToUpperDash" | "SentenceToTrain" | "SentenceToDot" | "SentenceToTitle";
66
104
  /** Identifies a conversion, e.g. `'CamelToSnake'`. */
67
- type ParserType = ParserCamelType | ParserDashType | ParserPascalType | ParserSnakeType | ParserUpperDashType | ParserUpperSnakeType | ParserTrainType | ParserDotType;
105
+ type ParserType = ParserCamelType | ParserDashType | ParserPascalType | ParserSnakeType | ParserUpperDashType | ParserUpperSnakeType | ParserTrainType | ParserDotType | ParserTitleType | ParserSentenceType;
68
106
  /** Flattens an intersection/mapped type so editors show the resulting keys. */
69
107
  type Prettify<T> = { [K in keyof T]: T[K]; } & {};
70
108
  /**
71
109
  * The type returned by a conversion: strings stay `string`, and object keys
72
110
  * (deeply, including inside arrays) are renamed according to the conversion `P`.
73
111
  */
74
- type Result<T, P> = T extends string ? string : T extends Array<unknown> ? { [K in keyof T]: Result<T[K], P>; } : T extends object ? Prettify<{ [K in keyof T as P extends "CamelToDash" ? CamelToDash<K & string> : P extends "CamelToPascal" ? CamelToPascal<K & string> : P extends "CamelToSnake" ? CamelToSnake<K & string> : P extends "CamelToUpperDash" ? CamelToUpperDash<K & string> : P extends "CamelToUpperSnake" ? CamelToUpperSnake<K & string> : P extends "DashToCamel" ? DashToCamel<K & string> : P extends "DashToPascal" ? DashToPascal<K & string> : P extends "DashToSnake" ? DashToSnake<K & string> : P extends "DashToUpperDash" ? DashToUpperDash<K & string> : P extends "DashToUpperSnake" ? DashToUpperSnake<K & string> : P extends "PascalToCamel" ? PascalToCamel<K & string> : P extends "PascalToDash" ? PascalToDash<K & string> : P extends "PascalToSnake" ? PascalToSnake<K & string> : P extends "PascalToUpperDash" ? PascalToUpperDash<K & string> : P extends "PascalToUpperSnake" ? PascalToUpperSnake<K & string> : P extends "SnakeToCamel" ? SnakeToCamel<K & string> : P extends "SnakeToDash" ? SnakeToDash<K & string> : P extends "SnakeToPascal" ? SnakeToPascal<K & string> : P extends "SnakeToUpperDash" ? SnakeToUpperDash<K & string> : P extends "SnakeToUpperSnake" ? SnakeToUpperSnake<K & string> : P extends "UpperDashToCamel" ? UpperDashToCamel<K & string> : P extends "UpperDashToDash" ? UpperDashToDash<K & string> : P extends "UpperDashToPascal" ? UpperDashToPascal<K & string> : P extends "UpperDashToSnake" ? UpperDashToSnake<K & string> : P extends "UpperDashToUpperSnake" ? UpperDashToUpperSnake<K & string> : P extends "UpperSnakeToCamel" ? UpperSnakeToCamel<K & string> : P extends "UpperSnakeToDash" ? UpperSnakeToDash<K & string> : P extends "UpperSnakeToPascal" ? UpperSnakeToPascal<K & string> : P extends "UpperSnakeToSnake" ? UpperSnakeToSnake<K & string> : P extends "UpperSnakeToUpperDash" ? UpperSnakeToUpperDash<K & string> : P extends "CamelToTrain" ? CamelToTrain<K & string> : P extends "CamelToDot" ? CamelToDot<K & string> : P extends "PascalToTrain" ? PascalToTrain<K & string> : P extends "PascalToDot" ? PascalToDot<K & string> : P extends "SnakeToTrain" ? SnakeToTrain<K & string> : P extends "SnakeToDot" ? SnakeToDot<K & string> : P extends "DashToTrain" ? DashToTrain<K & string> : P extends "DashToDot" ? DashToDot<K & string> : P extends "UpperSnakeToTrain" ? UpperSnakeToTrain<K & string> : P extends "UpperSnakeToDot" ? UpperSnakeToDot<K & string> : P extends "UpperDashToTrain" ? UpperDashToTrain<K & string> : P extends "UpperDashToDot" ? UpperDashToDot<K & string> : P extends "TrainToCamel" ? TrainToCamel<K & string> : P extends "TrainToPascal" ? TrainToPascal<K & string> : P extends "TrainToSnake" ? TrainToSnake<K & string> : P extends "TrainToDash" ? TrainToDash<K & string> : P extends "TrainToUpperSnake" ? TrainToUpperSnake<K & string> : P extends "TrainToUpperDash" ? TrainToUpperDash<K & string> : P extends "TrainToDot" ? TrainToDot<K & string> : P extends "DotToCamel" ? DotToCamel<K & string> : P extends "DotToPascal" ? DotToPascal<K & string> : P extends "DotToSnake" ? DotToSnake<K & string> : P extends "DotToDash" ? DotToDash<K & string> : P extends "DotToUpperSnake" ? DotToUpperSnake<K & string> : P extends "DotToUpperDash" ? DotToUpperDash<K & string> : P extends "DotToTrain" ? DotToTrain<K & string> : never]: Result<T[K], P>; }> : T;
112
+ type Result<T, P> = T extends string ? string : T extends Array<unknown> ? { [K in keyof T]: Result<T[K], P>; } : T extends object ? Prettify<{ [K in keyof T as P extends "CamelToDash" ? CamelToDash<K & string> : P extends "CamelToPascal" ? CamelToPascal<K & string> : P extends "CamelToSnake" ? CamelToSnake<K & string> : P extends "CamelToUpperDash" ? CamelToUpperDash<K & string> : P extends "CamelToUpperSnake" ? CamelToUpperSnake<K & string> : P extends "DashToCamel" ? DashToCamel<K & string> : P extends "DashToPascal" ? DashToPascal<K & string> : P extends "DashToSnake" ? DashToSnake<K & string> : P extends "DashToUpperDash" ? DashToUpperDash<K & string> : P extends "DashToUpperSnake" ? DashToUpperSnake<K & string> : P extends "PascalToCamel" ? PascalToCamel<K & string> : P extends "PascalToDash" ? PascalToDash<K & string> : P extends "PascalToSnake" ? PascalToSnake<K & string> : P extends "PascalToUpperDash" ? PascalToUpperDash<K & string> : P extends "PascalToUpperSnake" ? PascalToUpperSnake<K & string> : P extends "SnakeToCamel" ? SnakeToCamel<K & string> : P extends "SnakeToDash" ? SnakeToDash<K & string> : P extends "SnakeToPascal" ? SnakeToPascal<K & string> : P extends "SnakeToUpperDash" ? SnakeToUpperDash<K & string> : P extends "SnakeToUpperSnake" ? SnakeToUpperSnake<K & string> : P extends "UpperDashToCamel" ? UpperDashToCamel<K & string> : P extends "UpperDashToDash" ? UpperDashToDash<K & string> : P extends "UpperDashToPascal" ? UpperDashToPascal<K & string> : P extends "UpperDashToSnake" ? UpperDashToSnake<K & string> : P extends "UpperDashToUpperSnake" ? UpperDashToUpperSnake<K & string> : P extends "UpperSnakeToCamel" ? UpperSnakeToCamel<K & string> : P extends "UpperSnakeToDash" ? UpperSnakeToDash<K & string> : P extends "UpperSnakeToPascal" ? UpperSnakeToPascal<K & string> : P extends "UpperSnakeToSnake" ? UpperSnakeToSnake<K & string> : P extends "UpperSnakeToUpperDash" ? UpperSnakeToUpperDash<K & string> : P extends "CamelToTrain" ? CamelToTrain<K & string> : P extends "CamelToDot" ? CamelToDot<K & string> : P extends "PascalToTrain" ? PascalToTrain<K & string> : P extends "PascalToDot" ? PascalToDot<K & string> : P extends "SnakeToTrain" ? SnakeToTrain<K & string> : P extends "SnakeToDot" ? SnakeToDot<K & string> : P extends "DashToTrain" ? DashToTrain<K & string> : P extends "DashToDot" ? DashToDot<K & string> : P extends "UpperSnakeToTrain" ? UpperSnakeToTrain<K & string> : P extends "UpperSnakeToDot" ? UpperSnakeToDot<K & string> : P extends "UpperDashToTrain" ? UpperDashToTrain<K & string> : P extends "UpperDashToDot" ? UpperDashToDot<K & string> : P extends "TrainToCamel" ? TrainToCamel<K & string> : P extends "TrainToPascal" ? TrainToPascal<K & string> : P extends "TrainToSnake" ? TrainToSnake<K & string> : P extends "TrainToDash" ? TrainToDash<K & string> : P extends "TrainToUpperSnake" ? TrainToUpperSnake<K & string> : P extends "TrainToUpperDash" ? TrainToUpperDash<K & string> : P extends "TrainToDot" ? TrainToDot<K & string> : P extends "DotToCamel" ? DotToCamel<K & string> : P extends "DotToPascal" ? DotToPascal<K & string> : P extends "DotToSnake" ? DotToSnake<K & string> : P extends "DotToDash" ? DotToDash<K & string> : P extends "DotToUpperSnake" ? DotToUpperSnake<K & string> : P extends "DotToUpperDash" ? DotToUpperDash<K & string> : P extends "DotToTrain" ? DotToTrain<K & string> : P extends "CamelToTitle" ? CamelToTitle<K & string> : P extends "CamelToSentence" ? CamelToSentence<K & string> : P extends "PascalToTitle" ? PascalToTitle<K & string> : P extends "PascalToSentence" ? PascalToSentence<K & string> : P extends "SnakeToTitle" ? SnakeToTitle<K & string> : P extends "SnakeToSentence" ? SnakeToSentence<K & string> : P extends "DashToTitle" ? DashToTitle<K & string> : P extends "DashToSentence" ? DashToSentence<K & string> : P extends "UpperSnakeToTitle" ? UpperSnakeToTitle<K & string> : P extends "UpperSnakeToSentence" ? UpperSnakeToSentence<K & string> : P extends "UpperDashToTitle" ? UpperDashToTitle<K & string> : P extends "UpperDashToSentence" ? UpperDashToSentence<K & string> : P extends "TrainToTitle" ? TrainToTitle<K & string> : P extends "TrainToSentence" ? TrainToSentence<K & string> : P extends "DotToTitle" ? DotToTitle<K & string> : P extends "DotToSentence" ? DotToSentence<K & string> : P extends "TitleToCamel" ? TitleToCamel<K & string> : P extends "TitleToPascal" ? TitleToPascal<K & string> : P extends "TitleToSnake" ? TitleToSnake<K & string> : P extends "TitleToDash" ? TitleToDash<K & string> : P extends "TitleToUpperSnake" ? TitleToUpperSnake<K & string> : P extends "TitleToUpperDash" ? TitleToUpperDash<K & string> : P extends "TitleToTrain" ? TitleToTrain<K & string> : P extends "TitleToDot" ? TitleToDot<K & string> : P extends "TitleToSentence" ? TitleToSentence<K & string> : P extends "SentenceToCamel" ? SentenceToCamel<K & string> : P extends "SentenceToPascal" ? SentenceToPascal<K & string> : P extends "SentenceToSnake" ? SentenceToSnake<K & string> : P extends "SentenceToDash" ? SentenceToDash<K & string> : P extends "SentenceToUpperSnake" ? SentenceToUpperSnake<K & string> : P extends "SentenceToUpperDash" ? SentenceToUpperDash<K & string> : P extends "SentenceToTrain" ? SentenceToTrain<K & string> : P extends "SentenceToDot" ? SentenceToDot<K & string> : P extends "SentenceToTitle" ? SentenceToTitle<K & string> : never]: Result<T[K], P>; }> : T;
75
113
  //#endregion
76
114
  //#region src/camelCase/camelCase.d.ts
77
115
  /**
@@ -82,6 +120,9 @@ type Result<T, P> = T extends string ? string : T extends Array<unknown> ? { [K
82
120
  * camelToDash('helloWorld'); // 'hello-world'
83
121
  * camelToDash({ firstName: 'John' }); // { 'first-name': 'John' }
84
122
  * ```
123
+ *
124
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
125
+ * so results differ for keys like `userID` (see the migration notes in the README).
85
126
  */
86
127
  export declare function camelToDash<T extends object | string>(input: T): Result<T, "CamelToDash">;
87
128
  /**
@@ -92,6 +133,9 @@ export declare function camelToDash<T extends object | string>(input: T): Result
92
133
  * camelToSnake('helloWorld'); // 'hello_world'
93
134
  * camelToSnake({ firstName: 'John' }); // { first_name: 'John' }
94
135
  * ```
136
+ *
137
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
138
+ * so results differ for keys like `userID` (see the migration notes in the README).
95
139
  */
96
140
  export declare function camelToSnake<T extends object | string>(input: T): Result<T, "CamelToSnake">;
97
141
  /**
@@ -102,6 +146,9 @@ export declare function camelToSnake<T extends object | string>(input: T): Resul
102
146
  * camelToPascal('helloWorld'); // 'HelloWorld'
103
147
  * camelToPascal({ firstName: 'John' }); // { FirstName: 'John' }
104
148
  * ```
149
+ *
150
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
151
+ * so results differ for keys like `userID` (see the migration notes in the README).
105
152
  */
106
153
  export declare function camelToPascal<T extends object | string>(input: T): Result<T, "CamelToPascal">;
107
154
  /**
@@ -112,6 +159,9 @@ export declare function camelToPascal<T extends object | string>(input: T): Resu
112
159
  * camelToUpperSnake('helloWorld'); // 'HELLO_WORLD'
113
160
  * camelToUpperSnake({ firstName: 'John' }); // { FIRST_NAME: 'John' }
114
161
  * ```
162
+ *
163
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
164
+ * so results differ for keys like `userID` (see the migration notes in the README).
115
165
  */
116
166
  export declare function camelToUpperSnake<T extends object | string>(input: T): Result<T, "CamelToUpperSnake">;
117
167
  /**
@@ -122,6 +172,9 @@ export declare function camelToUpperSnake<T extends object | string>(input: T):
122
172
  * camelToUpperDash('helloWorld'); // 'HELLO-WORLD'
123
173
  * camelToUpperDash({ firstName: 'John' }); // { 'FIRST-NAME': 'John' }
124
174
  * ```
175
+ *
176
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
177
+ * so results differ for keys like `userID` (see the migration notes in the README).
125
178
  */
126
179
  export declare function camelToUpperDash<T extends object | string>(input: T): Result<T, "CamelToUpperDash">;
127
180
  /**
@@ -132,6 +185,9 @@ export declare function camelToUpperDash<T extends object | string>(input: T): R
132
185
  * camelToTrain('helloWorld'); // 'Hello-World'
133
186
  * camelToTrain({ firstName: 'John' }); // { 'First-Name': 'John' }
134
187
  * ```
188
+ *
189
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
190
+ * so results differ for keys like `userID` (see the migration notes in the README).
135
191
  */
136
192
  export declare function camelToTrain<T extends object | string>(input: T): Result<T, "CamelToTrain">;
137
193
  /**
@@ -142,8 +198,37 @@ export declare function camelToTrain<T extends object | string>(input: T): Resul
142
198
  * camelToDot('helloWorld'); // 'hello.world'
143
199
  * camelToDot({ firstName: 'John' }); // { 'first.name': 'John' }
144
200
  * ```
201
+ *
202
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
203
+ * so results differ for keys like `userID` (see the migration notes in the README).
145
204
  */
146
205
  export declare function camelToDot<T extends object | string>(input: T): Result<T, "CamelToDot">;
206
+ /**
207
+ * Converts a string, or the keys of an object/array (deeply), from camelCase to Title Case.
208
+ *
209
+ * @example
210
+ * ```ts
211
+ * camelToTitle('helloWorld'); // 'Hello World'
212
+ * camelToTitle({ firstName: 'John' }); // { 'First Name': 'John' }
213
+ * ```
214
+ *
215
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
216
+ * so results differ for keys like `userID` (see the migration notes in the README).
217
+ */
218
+ export declare function camelToTitle<T extends object | string>(input: T): Result<T, "CamelToTitle">;
219
+ /**
220
+ * Converts a string, or the keys of an object/array (deeply), from camelCase to Sentence case.
221
+ *
222
+ * @example
223
+ * ```ts
224
+ * camelToSentence('helloWorld'); // 'Hello world'
225
+ * camelToSentence({ firstName: 'John' }); // { 'First name': 'John' }
226
+ * ```
227
+ *
228
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
229
+ * so results differ for keys like `userID` (see the migration notes in the README).
230
+ */
231
+ export declare function camelToSentence<T extends object | string>(input: T): Result<T, "CamelToSentence">;
147
232
  //#endregion
148
233
  //#region src/dashCase/dashCase.d.ts
149
234
  /**
@@ -154,6 +239,9 @@ export declare function camelToDot<T extends object | string>(input: T): Result<
154
239
  * dashToSnake('hello-world'); // 'hello_world'
155
240
  * dashToSnake({ 'first-name': 'John' }); // { first_name: 'John' }
156
241
  * ```
242
+ *
243
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
244
+ * so results differ for keys like `userID` (see the migration notes in the README).
157
245
  */
158
246
  export declare function dashToSnake<T extends object | string>(input: T): Result<T, "DashToSnake">;
159
247
  /**
@@ -164,6 +252,9 @@ export declare function dashToSnake<T extends object | string>(input: T): Result
164
252
  * dashToCamel('hello-world'); // 'helloWorld'
165
253
  * dashToCamel({ 'first-name': 'John' }); // { firstName: 'John' }
166
254
  * ```
255
+ *
256
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
257
+ * so results differ for keys like `userID` (see the migration notes in the README).
167
258
  */
168
259
  export declare function dashToCamel<T extends object | string>(input: T): Result<T, "DashToCamel">;
169
260
  /**
@@ -174,6 +265,9 @@ export declare function dashToCamel<T extends object | string>(input: T): Result
174
265
  * dashToPascal('hello-world'); // 'HelloWorld'
175
266
  * dashToPascal({ 'first-name': 'John' }); // { FirstName: 'John' }
176
267
  * ```
268
+ *
269
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
270
+ * so results differ for keys like `userID` (see the migration notes in the README).
177
271
  */
178
272
  export declare function dashToPascal<T extends object | string>(input: T): Result<T, "DashToPascal">;
179
273
  /**
@@ -184,6 +278,9 @@ export declare function dashToPascal<T extends object | string>(input: T): Resul
184
278
  * dashToUpperSnake('hello-world'); // 'HELLO_WORLD'
185
279
  * dashToUpperSnake({ 'first-name': 'John' }); // { FIRST_NAME: 'John' }
186
280
  * ```
281
+ *
282
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
283
+ * so results differ for keys like `userID` (see the migration notes in the README).
187
284
  */
188
285
  export declare function dashToUpperSnake<T extends object | string>(input: T): Result<T, "DashToUpperSnake">;
189
286
  /**
@@ -194,6 +291,9 @@ export declare function dashToUpperSnake<T extends object | string>(input: T): R
194
291
  * dashToUpperDash('hello-world'); // 'HELLO-WORLD'
195
292
  * dashToUpperDash({ 'first-name': 'John' }); // { 'FIRST-NAME': 'John' }
196
293
  * ```
294
+ *
295
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
296
+ * so results differ for keys like `userID` (see the migration notes in the README).
197
297
  */
198
298
  export declare function dashToUpperDash<T extends object | string>(input: T): Result<T, "DashToUpperDash">;
199
299
  /**
@@ -204,6 +304,9 @@ export declare function dashToUpperDash<T extends object | string>(input: T): Re
204
304
  * dashToTrain('hello-world'); // 'Hello-World'
205
305
  * dashToTrain({ 'first-name': 'John' }); // { 'First-Name': 'John' }
206
306
  * ```
307
+ *
308
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
309
+ * so results differ for keys like `userID` (see the migration notes in the README).
207
310
  */
208
311
  export declare function dashToTrain<T extends object | string>(input: T): Result<T, "DashToTrain">;
209
312
  /**
@@ -214,8 +317,37 @@ export declare function dashToTrain<T extends object | string>(input: T): Result
214
317
  * dashToDot('hello-world'); // 'hello.world'
215
318
  * dashToDot({ 'first-name': 'John' }); // { 'first.name': 'John' }
216
319
  * ```
320
+ *
321
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
322
+ * so results differ for keys like `userID` (see the migration notes in the README).
217
323
  */
218
324
  export declare function dashToDot<T extends object | string>(input: T): Result<T, "DashToDot">;
325
+ /**
326
+ * Converts a string, or the keys of an object/array (deeply), from dash-case to Title Case.
327
+ *
328
+ * @example
329
+ * ```ts
330
+ * dashToTitle('hello-world'); // 'Hello World'
331
+ * dashToTitle({ 'first-name': 'John' }); // { 'First Name': 'John' }
332
+ * ```
333
+ *
334
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
335
+ * so results differ for keys like `userID` (see the migration notes in the README).
336
+ */
337
+ export declare function dashToTitle<T extends object | string>(input: T): Result<T, "DashToTitle">;
338
+ /**
339
+ * Converts a string, or the keys of an object/array (deeply), from dash-case to Sentence case.
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * dashToSentence('hello-world'); // 'Hello world'
344
+ * dashToSentence({ 'first-name': 'John' }); // { 'First name': 'John' }
345
+ * ```
346
+ *
347
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
348
+ * so results differ for keys like `userID` (see the migration notes in the README).
349
+ */
350
+ export declare function dashToSentence<T extends object | string>(input: T): Result<T, "DashToSentence">;
219
351
  //#endregion
220
352
  //#region src/pascalCase/pascalCase.d.ts
221
353
  /**
@@ -226,6 +358,9 @@ export declare function dashToDot<T extends object | string>(input: T): Result<T
226
358
  * pascalToCamel('HelloWorld'); // 'helloWorld'
227
359
  * pascalToCamel({ FirstName: 'John' }); // { firstName: 'John' }
228
360
  * ```
361
+ *
362
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
363
+ * so results differ for keys like `userID` (see the migration notes in the README).
229
364
  */
230
365
  export declare function pascalToCamel<T extends object | string>(input: T): Result<T, "PascalToCamel">;
231
366
  /**
@@ -236,6 +371,9 @@ export declare function pascalToCamel<T extends object | string>(input: T): Resu
236
371
  * pascalToSnake('HelloWorld'); // 'hello_world'
237
372
  * pascalToSnake({ FirstName: 'John' }); // { first_name: 'John' }
238
373
  * ```
374
+ *
375
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
376
+ * so results differ for keys like `userID` (see the migration notes in the README).
239
377
  */
240
378
  export declare function pascalToSnake<T extends object | string>(input: T): Result<T, "PascalToSnake">;
241
379
  /**
@@ -246,6 +384,9 @@ export declare function pascalToSnake<T extends object | string>(input: T): Resu
246
384
  * pascalToDash('HelloWorld'); // 'hello-world'
247
385
  * pascalToDash({ FirstName: 'John' }); // { 'first-name': 'John' }
248
386
  * ```
387
+ *
388
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
389
+ * so results differ for keys like `userID` (see the migration notes in the README).
249
390
  */
250
391
  export declare function pascalToDash<T extends object | string>(input: T): Result<T, "PascalToDash">;
251
392
  /**
@@ -256,6 +397,9 @@ export declare function pascalToDash<T extends object | string>(input: T): Resul
256
397
  * pascalToUpperSnake('HelloWorld'); // 'HELLO_WORLD'
257
398
  * pascalToUpperSnake({ FirstName: 'John' }); // { FIRST_NAME: 'John' }
258
399
  * ```
400
+ *
401
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
402
+ * so results differ for keys like `userID` (see the migration notes in the README).
259
403
  */
260
404
  export declare function pascalToUpperSnake<T extends object | string>(input: T): Result<T, "PascalToUpperSnake">;
261
405
  /**
@@ -266,6 +410,9 @@ export declare function pascalToUpperSnake<T extends object | string>(input: T):
266
410
  * pascalToUpperDash('HelloWorld'); // 'HELLO-WORLD'
267
411
  * pascalToUpperDash({ FirstName: 'John' }); // { 'FIRST-NAME': 'John' }
268
412
  * ```
413
+ *
414
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
415
+ * so results differ for keys like `userID` (see the migration notes in the README).
269
416
  */
270
417
  export declare function pascalToUpperDash<T extends object | string>(input: T): Result<T, "PascalToUpperDash">;
271
418
  /**
@@ -276,6 +423,9 @@ export declare function pascalToUpperDash<T extends object | string>(input: T):
276
423
  * pascalToTrain('HelloWorld'); // 'Hello-World'
277
424
  * pascalToTrain({ FirstName: 'John' }); // { 'First-Name': 'John' }
278
425
  * ```
426
+ *
427
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
428
+ * so results differ for keys like `userID` (see the migration notes in the README).
279
429
  */
280
430
  export declare function pascalToTrain<T extends object | string>(input: T): Result<T, "PascalToTrain">;
281
431
  /**
@@ -286,8 +436,37 @@ export declare function pascalToTrain<T extends object | string>(input: T): Resu
286
436
  * pascalToDot('HelloWorld'); // 'hello.world'
287
437
  * pascalToDot({ FirstName: 'John' }); // { 'first.name': 'John' }
288
438
  * ```
439
+ *
440
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
441
+ * so results differ for keys like `userID` (see the migration notes in the README).
289
442
  */
290
443
  export declare function pascalToDot<T extends object | string>(input: T): Result<T, "PascalToDot">;
444
+ /**
445
+ * Converts a string, or the keys of an object/array (deeply), from PascalCase to Title Case.
446
+ *
447
+ * @example
448
+ * ```ts
449
+ * pascalToTitle('HelloWorld'); // 'Hello World'
450
+ * pascalToTitle({ FirstName: 'John' }); // { 'First Name': 'John' }
451
+ * ```
452
+ *
453
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
454
+ * so results differ for keys like `userID` (see the migration notes in the README).
455
+ */
456
+ export declare function pascalToTitle<T extends object | string>(input: T): Result<T, "PascalToTitle">;
457
+ /**
458
+ * Converts a string, or the keys of an object/array (deeply), from PascalCase to Sentence case.
459
+ *
460
+ * @example
461
+ * ```ts
462
+ * pascalToSentence('HelloWorld'); // 'Hello world'
463
+ * pascalToSentence({ FirstName: 'John' }); // { 'First name': 'John' }
464
+ * ```
465
+ *
466
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
467
+ * so results differ for keys like `userID` (see the migration notes in the README).
468
+ */
469
+ export declare function pascalToSentence<T extends object | string>(input: T): Result<T, "PascalToSentence">;
291
470
  //#endregion
292
471
  //#region src/snakeCase/snakeCase.d.ts
293
472
  /**
@@ -298,6 +477,9 @@ export declare function pascalToDot<T extends object | string>(input: T): Result
298
477
  * snakeToCamel('hello_world'); // 'helloWorld'
299
478
  * snakeToCamel({ first_name: 'John' }); // { firstName: 'John' }
300
479
  * ```
480
+ *
481
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
482
+ * so results differ for keys like `userID` (see the migration notes in the README).
301
483
  */
302
484
  export declare function snakeToCamel<T extends object | string>(input: T): Result<T, "SnakeToCamel">;
303
485
  /**
@@ -308,6 +490,9 @@ export declare function snakeToCamel<T extends object | string>(input: T): Resul
308
490
  * snakeToDash('hello_world'); // 'hello-world'
309
491
  * snakeToDash({ first_name: 'John' }); // { 'first-name': 'John' }
310
492
  * ```
493
+ *
494
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
495
+ * so results differ for keys like `userID` (see the migration notes in the README).
311
496
  */
312
497
  export declare function snakeToDash<T extends object | string>(input: T): Result<T, "SnakeToDash">;
313
498
  /**
@@ -318,6 +503,9 @@ export declare function snakeToDash<T extends object | string>(input: T): Result
318
503
  * snakeToPascal('hello_world'); // 'HelloWorld'
319
504
  * snakeToPascal({ first_name: 'John' }); // { FirstName: 'John' }
320
505
  * ```
506
+ *
507
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
508
+ * so results differ for keys like `userID` (see the migration notes in the README).
321
509
  */
322
510
  export declare function snakeToPascal<T extends object | string>(input: T): Result<T, "SnakeToPascal">;
323
511
  /**
@@ -328,6 +516,9 @@ export declare function snakeToPascal<T extends object | string>(input: T): Resu
328
516
  * snakeToUpperSnake('hello_world'); // 'HELLO_WORLD'
329
517
  * snakeToUpperSnake({ first_name: 'John' }); // { FIRST_NAME: 'John' }
330
518
  * ```
519
+ *
520
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
521
+ * so results differ for keys like `userID` (see the migration notes in the README).
331
522
  */
332
523
  export declare function snakeToUpperSnake<T extends object | string>(input: T): Result<T, "SnakeToUpperSnake">;
333
524
  /**
@@ -338,6 +529,9 @@ export declare function snakeToUpperSnake<T extends object | string>(input: T):
338
529
  * snakeToUpperDash('hello_world'); // 'HELLO-WORLD'
339
530
  * snakeToUpperDash({ first_name: 'John' }); // { 'FIRST-NAME': 'John' }
340
531
  * ```
532
+ *
533
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
534
+ * so results differ for keys like `userID` (see the migration notes in the README).
341
535
  */
342
536
  export declare function snakeToUpperDash<T extends object | string>(input: T): Result<T, "SnakeToUpperDash">;
343
537
  /**
@@ -348,6 +542,9 @@ export declare function snakeToUpperDash<T extends object | string>(input: T): R
348
542
  * snakeToTrain('hello_world'); // 'Hello-World'
349
543
  * snakeToTrain({ first_name: 'John' }); // { 'First-Name': 'John' }
350
544
  * ```
545
+ *
546
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
547
+ * so results differ for keys like `userID` (see the migration notes in the README).
351
548
  */
352
549
  export declare function snakeToTrain<T extends object | string>(input: T): Result<T, "SnakeToTrain">;
353
550
  /**
@@ -358,8 +555,37 @@ export declare function snakeToTrain<T extends object | string>(input: T): Resul
358
555
  * snakeToDot('hello_world'); // 'hello.world'
359
556
  * snakeToDot({ first_name: 'John' }); // { 'first.name': 'John' }
360
557
  * ```
558
+ *
559
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
560
+ * so results differ for keys like `userID` (see the migration notes in the README).
361
561
  */
362
562
  export declare function snakeToDot<T extends object | string>(input: T): Result<T, "SnakeToDot">;
563
+ /**
564
+ * Converts a string, or the keys of an object/array (deeply), from snake_case to Title Case.
565
+ *
566
+ * @example
567
+ * ```ts
568
+ * snakeToTitle('hello_world'); // 'Hello World'
569
+ * snakeToTitle({ first_name: 'John' }); // { 'First Name': 'John' }
570
+ * ```
571
+ *
572
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
573
+ * so results differ for keys like `userID` (see the migration notes in the README).
574
+ */
575
+ export declare function snakeToTitle<T extends object | string>(input: T): Result<T, "SnakeToTitle">;
576
+ /**
577
+ * Converts a string, or the keys of an object/array (deeply), from snake_case to Sentence case.
578
+ *
579
+ * @example
580
+ * ```ts
581
+ * snakeToSentence('hello_world'); // 'Hello world'
582
+ * snakeToSentence({ first_name: 'John' }); // { 'First name': 'John' }
583
+ * ```
584
+ *
585
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
586
+ * so results differ for keys like `userID` (see the migration notes in the README).
587
+ */
588
+ export declare function snakeToSentence<T extends object | string>(input: T): Result<T, "SnakeToSentence">;
363
589
  //#endregion
364
590
  //#region src/trainCase/trainCase.d.ts
365
591
  /**
@@ -370,6 +596,9 @@ export declare function snakeToDot<T extends object | string>(input: T): Result<
370
596
  * trainToCamel('Hello-World'); // 'helloWorld'
371
597
  * trainToCamel({ 'First-Name': 'John' }); // { firstName: 'John' }
372
598
  * ```
599
+ *
600
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
601
+ * so results differ for keys like `userID` (see the migration notes in the README).
373
602
  */
374
603
  export declare function trainToCamel<T extends object | string>(input: T): Result<T, "TrainToCamel">;
375
604
  /**
@@ -380,6 +609,9 @@ export declare function trainToCamel<T extends object | string>(input: T): Resul
380
609
  * trainToPascal('Hello-World'); // 'HelloWorld'
381
610
  * trainToPascal({ 'First-Name': 'John' }); // { FirstName: 'John' }
382
611
  * ```
612
+ *
613
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
614
+ * so results differ for keys like `userID` (see the migration notes in the README).
383
615
  */
384
616
  export declare function trainToPascal<T extends object | string>(input: T): Result<T, "TrainToPascal">;
385
617
  /**
@@ -390,6 +622,9 @@ export declare function trainToPascal<T extends object | string>(input: T): Resu
390
622
  * trainToSnake('Hello-World'); // 'hello_world'
391
623
  * trainToSnake({ 'First-Name': 'John' }); // { first_name: 'John' }
392
624
  * ```
625
+ *
626
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
627
+ * so results differ for keys like `userID` (see the migration notes in the README).
393
628
  */
394
629
  export declare function trainToSnake<T extends object | string>(input: T): Result<T, "TrainToSnake">;
395
630
  /**
@@ -400,6 +635,9 @@ export declare function trainToSnake<T extends object | string>(input: T): Resul
400
635
  * trainToDash('Hello-World'); // 'hello-world'
401
636
  * trainToDash({ 'First-Name': 'John' }); // { 'first-name': 'John' }
402
637
  * ```
638
+ *
639
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
640
+ * so results differ for keys like `userID` (see the migration notes in the README).
403
641
  */
404
642
  export declare function trainToDash<T extends object | string>(input: T): Result<T, "TrainToDash">;
405
643
  /**
@@ -410,6 +648,9 @@ export declare function trainToDash<T extends object | string>(input: T): Result
410
648
  * trainToUpperSnake('Hello-World'); // 'HELLO_WORLD'
411
649
  * trainToUpperSnake({ 'First-Name': 'John' }); // { FIRST_NAME: 'John' }
412
650
  * ```
651
+ *
652
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
653
+ * so results differ for keys like `userID` (see the migration notes in the README).
413
654
  */
414
655
  export declare function trainToUpperSnake<T extends object | string>(input: T): Result<T, "TrainToUpperSnake">;
415
656
  /**
@@ -420,6 +661,9 @@ export declare function trainToUpperSnake<T extends object | string>(input: T):
420
661
  * trainToUpperDash('Hello-World'); // 'HELLO-WORLD'
421
662
  * trainToUpperDash({ 'First-Name': 'John' }); // { 'FIRST-NAME': 'John' }
422
663
  * ```
664
+ *
665
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
666
+ * so results differ for keys like `userID` (see the migration notes in the README).
423
667
  */
424
668
  export declare function trainToUpperDash<T extends object | string>(input: T): Result<T, "TrainToUpperDash">;
425
669
  /**
@@ -430,8 +674,37 @@ export declare function trainToUpperDash<T extends object | string>(input: T): R
430
674
  * trainToDot('Hello-World'); // 'hello.world'
431
675
  * trainToDot({ 'First-Name': 'John' }); // { 'first.name': 'John' }
432
676
  * ```
677
+ *
678
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
679
+ * so results differ for keys like `userID` (see the migration notes in the README).
433
680
  */
434
681
  export declare function trainToDot<T extends object | string>(input: T): Result<T, "TrainToDot">;
682
+ /**
683
+ * Converts a string, or the keys of an object/array (deeply), from Train-Case to Title Case.
684
+ *
685
+ * @example
686
+ * ```ts
687
+ * trainToTitle('Hello-World'); // 'Hello World'
688
+ * trainToTitle({ 'First-Name': 'John' }); // { 'First Name': 'John' }
689
+ * ```
690
+ *
691
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
692
+ * so results differ for keys like `userID` (see the migration notes in the README).
693
+ */
694
+ export declare function trainToTitle<T extends object | string>(input: T): Result<T, "TrainToTitle">;
695
+ /**
696
+ * Converts a string, or the keys of an object/array (deeply), from Train-Case to Sentence case.
697
+ *
698
+ * @example
699
+ * ```ts
700
+ * trainToSentence('Hello-World'); // 'Hello world'
701
+ * trainToSentence({ 'First-Name': 'John' }); // { 'First name': 'John' }
702
+ * ```
703
+ *
704
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
705
+ * so results differ for keys like `userID` (see the migration notes in the README).
706
+ */
707
+ export declare function trainToSentence<T extends object | string>(input: T): Result<T, "TrainToSentence">;
435
708
  //#endregion
436
709
  //#region src/dotCase/dotCase.d.ts
437
710
  /**
@@ -442,6 +715,9 @@ export declare function trainToDot<T extends object | string>(input: T): Result<
442
715
  * dotToCamel('hello.world'); // 'helloWorld'
443
716
  * dotToCamel({ 'first.name': 'John' }); // { firstName: 'John' }
444
717
  * ```
718
+ *
719
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
720
+ * so results differ for keys like `userID` (see the migration notes in the README).
445
721
  */
446
722
  export declare function dotToCamel<T extends object | string>(input: T): Result<T, "DotToCamel">;
447
723
  /**
@@ -452,6 +728,9 @@ export declare function dotToCamel<T extends object | string>(input: T): Result<
452
728
  * dotToPascal('hello.world'); // 'HelloWorld'
453
729
  * dotToPascal({ 'first.name': 'John' }); // { FirstName: 'John' }
454
730
  * ```
731
+ *
732
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
733
+ * so results differ for keys like `userID` (see the migration notes in the README).
455
734
  */
456
735
  export declare function dotToPascal<T extends object | string>(input: T): Result<T, "DotToPascal">;
457
736
  /**
@@ -462,6 +741,9 @@ export declare function dotToPascal<T extends object | string>(input: T): Result
462
741
  * dotToSnake('hello.world'); // 'hello_world'
463
742
  * dotToSnake({ 'first.name': 'John' }); // { first_name: 'John' }
464
743
  * ```
744
+ *
745
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
746
+ * so results differ for keys like `userID` (see the migration notes in the README).
465
747
  */
466
748
  export declare function dotToSnake<T extends object | string>(input: T): Result<T, "DotToSnake">;
467
749
  /**
@@ -472,6 +754,9 @@ export declare function dotToSnake<T extends object | string>(input: T): Result<
472
754
  * dotToDash('hello.world'); // 'hello-world'
473
755
  * dotToDash({ 'first.name': 'John' }); // { 'first-name': 'John' }
474
756
  * ```
757
+ *
758
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
759
+ * so results differ for keys like `userID` (see the migration notes in the README).
475
760
  */
476
761
  export declare function dotToDash<T extends object | string>(input: T): Result<T, "DotToDash">;
477
762
  /**
@@ -482,6 +767,9 @@ export declare function dotToDash<T extends object | string>(input: T): Result<T
482
767
  * dotToUpperSnake('hello.world'); // 'HELLO_WORLD'
483
768
  * dotToUpperSnake({ 'first.name': 'John' }); // { FIRST_NAME: 'John' }
484
769
  * ```
770
+ *
771
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
772
+ * so results differ for keys like `userID` (see the migration notes in the README).
485
773
  */
486
774
  export declare function dotToUpperSnake<T extends object | string>(input: T): Result<T, "DotToUpperSnake">;
487
775
  /**
@@ -492,6 +780,9 @@ export declare function dotToUpperSnake<T extends object | string>(input: T): Re
492
780
  * dotToUpperDash('hello.world'); // 'HELLO-WORLD'
493
781
  * dotToUpperDash({ 'first.name': 'John' }); // { 'FIRST-NAME': 'John' }
494
782
  * ```
783
+ *
784
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
785
+ * so results differ for keys like `userID` (see the migration notes in the README).
495
786
  */
496
787
  export declare function dotToUpperDash<T extends object | string>(input: T): Result<T, "DotToUpperDash">;
497
788
  /**
@@ -502,8 +793,275 @@ export declare function dotToUpperDash<T extends object | string>(input: T): Res
502
793
  * dotToTrain('hello.world'); // 'Hello-World'
503
794
  * dotToTrain({ 'first.name': 'John' }); // { 'First-Name': 'John' }
504
795
  * ```
796
+ *
797
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
798
+ * so results differ for keys like `userID` (see the migration notes in the README).
505
799
  */
506
800
  export declare function dotToTrain<T extends object | string>(input: T): Result<T, "DotToTrain">;
801
+ /**
802
+ * Converts a string, or the keys of an object/array (deeply), from dot.case to Title Case.
803
+ *
804
+ * @example
805
+ * ```ts
806
+ * dotToTitle('hello.world'); // 'Hello World'
807
+ * dotToTitle({ 'first.name': 'John' }); // { 'First Name': 'John' }
808
+ * ```
809
+ *
810
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
811
+ * so results differ for keys like `userID` (see the migration notes in the README).
812
+ */
813
+ export declare function dotToTitle<T extends object | string>(input: T): Result<T, "DotToTitle">;
814
+ /**
815
+ * Converts a string, or the keys of an object/array (deeply), from dot.case to Sentence case.
816
+ *
817
+ * @example
818
+ * ```ts
819
+ * dotToSentence('hello.world'); // 'Hello world'
820
+ * dotToSentence({ 'first.name': 'John' }); // { 'First name': 'John' }
821
+ * ```
822
+ *
823
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
824
+ * so results differ for keys like `userID` (see the migration notes in the README).
825
+ */
826
+ export declare function dotToSentence<T extends object | string>(input: T): Result<T, "DotToSentence">;
827
+ //#endregion
828
+ //#region src/titleCase/titleCase.d.ts
829
+ /**
830
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to camelCase.
831
+ *
832
+ * @example
833
+ * ```ts
834
+ * titleToCamel('Hello World'); // 'helloWorld'
835
+ * titleToCamel({ 'First Name': 'John' }); // { firstName: 'John' }
836
+ * ```
837
+ *
838
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
839
+ * so results differ for keys like `userID` (see the migration notes in the README).
840
+ */
841
+ export declare function titleToCamel<T extends object | string>(input: T): Result<T, "TitleToCamel">;
842
+ /**
843
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to PascalCase.
844
+ *
845
+ * @example
846
+ * ```ts
847
+ * titleToPascal('Hello World'); // 'HelloWorld'
848
+ * titleToPascal({ 'First Name': 'John' }); // { FirstName: 'John' }
849
+ * ```
850
+ *
851
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
852
+ * so results differ for keys like `userID` (see the migration notes in the README).
853
+ */
854
+ export declare function titleToPascal<T extends object | string>(input: T): Result<T, "TitleToPascal">;
855
+ /**
856
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to snake_case.
857
+ *
858
+ * @example
859
+ * ```ts
860
+ * titleToSnake('Hello World'); // 'hello_world'
861
+ * titleToSnake({ 'First Name': 'John' }); // { first_name: 'John' }
862
+ * ```
863
+ *
864
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
865
+ * so results differ for keys like `userID` (see the migration notes in the README).
866
+ */
867
+ export declare function titleToSnake<T extends object | string>(input: T): Result<T, "TitleToSnake">;
868
+ /**
869
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to dash-case.
870
+ *
871
+ * @example
872
+ * ```ts
873
+ * titleToDash('Hello World'); // 'hello-world'
874
+ * titleToDash({ 'First Name': 'John' }); // { 'first-name': 'John' }
875
+ * ```
876
+ *
877
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
878
+ * so results differ for keys like `userID` (see the migration notes in the README).
879
+ */
880
+ export declare function titleToDash<T extends object | string>(input: T): Result<T, "TitleToDash">;
881
+ /**
882
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to UPPER_SNAKE_CASE.
883
+ *
884
+ * @example
885
+ * ```ts
886
+ * titleToUpperSnake('Hello World'); // 'HELLO_WORLD'
887
+ * titleToUpperSnake({ 'First Name': 'John' }); // { FIRST_NAME: 'John' }
888
+ * ```
889
+ *
890
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
891
+ * so results differ for keys like `userID` (see the migration notes in the README).
892
+ */
893
+ export declare function titleToUpperSnake<T extends object | string>(input: T): Result<T, "TitleToUpperSnake">;
894
+ /**
895
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to UPPER-DASH-CASE.
896
+ *
897
+ * @example
898
+ * ```ts
899
+ * titleToUpperDash('Hello World'); // 'HELLO-WORLD'
900
+ * titleToUpperDash({ 'First Name': 'John' }); // { 'FIRST-NAME': 'John' }
901
+ * ```
902
+ *
903
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
904
+ * so results differ for keys like `userID` (see the migration notes in the README).
905
+ */
906
+ export declare function titleToUpperDash<T extends object | string>(input: T): Result<T, "TitleToUpperDash">;
907
+ /**
908
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to Train-Case.
909
+ *
910
+ * @example
911
+ * ```ts
912
+ * titleToTrain('Hello World'); // 'Hello-World'
913
+ * titleToTrain({ 'First Name': 'John' }); // { 'First-Name': 'John' }
914
+ * ```
915
+ *
916
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
917
+ * so results differ for keys like `userID` (see the migration notes in the README).
918
+ */
919
+ export declare function titleToTrain<T extends object | string>(input: T): Result<T, "TitleToTrain">;
920
+ /**
921
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to dot.case.
922
+ *
923
+ * @example
924
+ * ```ts
925
+ * titleToDot('Hello World'); // 'hello.world'
926
+ * titleToDot({ 'First Name': 'John' }); // { 'first.name': 'John' }
927
+ * ```
928
+ *
929
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
930
+ * so results differ for keys like `userID` (see the migration notes in the README).
931
+ */
932
+ export declare function titleToDot<T extends object | string>(input: T): Result<T, "TitleToDot">;
933
+ /**
934
+ * Converts a string, or the keys of an object/array (deeply), from Title Case to Sentence case.
935
+ *
936
+ * @example
937
+ * ```ts
938
+ * titleToSentence('Hello World'); // 'Hello world'
939
+ * titleToSentence({ 'First Name': 'John' }); // { 'First name': 'John' }
940
+ * ```
941
+ *
942
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
943
+ * so results differ for keys like `userID` (see the migration notes in the README).
944
+ */
945
+ export declare function titleToSentence<T extends object | string>(input: T): Result<T, "TitleToSentence">;
946
+ //#endregion
947
+ //#region src/sentenceCase/sentenceCase.d.ts
948
+ /**
949
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to camelCase.
950
+ *
951
+ * @example
952
+ * ```ts
953
+ * sentenceToCamel('Hello world'); // 'helloWorld'
954
+ * sentenceToCamel({ 'First name': 'John' }); // { firstName: 'John' }
955
+ * ```
956
+ *
957
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
958
+ * so results differ for keys like `userID` (see the migration notes in the README).
959
+ */
960
+ export declare function sentenceToCamel<T extends object | string>(input: T): Result<T, "SentenceToCamel">;
961
+ /**
962
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to PascalCase.
963
+ *
964
+ * @example
965
+ * ```ts
966
+ * sentenceToPascal('Hello world'); // 'HelloWorld'
967
+ * sentenceToPascal({ 'First name': 'John' }); // { FirstName: 'John' }
968
+ * ```
969
+ *
970
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
971
+ * so results differ for keys like `userID` (see the migration notes in the README).
972
+ */
973
+ export declare function sentenceToPascal<T extends object | string>(input: T): Result<T, "SentenceToPascal">;
974
+ /**
975
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to snake_case.
976
+ *
977
+ * @example
978
+ * ```ts
979
+ * sentenceToSnake('Hello world'); // 'hello_world'
980
+ * sentenceToSnake({ 'First name': 'John' }); // { first_name: 'John' }
981
+ * ```
982
+ *
983
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
984
+ * so results differ for keys like `userID` (see the migration notes in the README).
985
+ */
986
+ export declare function sentenceToSnake<T extends object | string>(input: T): Result<T, "SentenceToSnake">;
987
+ /**
988
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to dash-case.
989
+ *
990
+ * @example
991
+ * ```ts
992
+ * sentenceToDash('Hello world'); // 'hello-world'
993
+ * sentenceToDash({ 'First name': 'John' }); // { 'first-name': 'John' }
994
+ * ```
995
+ *
996
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
997
+ * so results differ for keys like `userID` (see the migration notes in the README).
998
+ */
999
+ export declare function sentenceToDash<T extends object | string>(input: T): Result<T, "SentenceToDash">;
1000
+ /**
1001
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to UPPER_SNAKE_CASE.
1002
+ *
1003
+ * @example
1004
+ * ```ts
1005
+ * sentenceToUpperSnake('Hello world'); // 'HELLO_WORLD'
1006
+ * sentenceToUpperSnake({ 'First name': 'John' }); // { FIRST_NAME: 'John' }
1007
+ * ```
1008
+ *
1009
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
1010
+ * so results differ for keys like `userID` (see the migration notes in the README).
1011
+ */
1012
+ export declare function sentenceToUpperSnake<T extends object | string>(input: T): Result<T, "SentenceToUpperSnake">;
1013
+ /**
1014
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to UPPER-DASH-CASE.
1015
+ *
1016
+ * @example
1017
+ * ```ts
1018
+ * sentenceToUpperDash('Hello world'); // 'HELLO-WORLD'
1019
+ * sentenceToUpperDash({ 'First name': 'John' }); // { 'FIRST-NAME': 'John' }
1020
+ * ```
1021
+ *
1022
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
1023
+ * so results differ for keys like `userID` (see the migration notes in the README).
1024
+ */
1025
+ export declare function sentenceToUpperDash<T extends object | string>(input: T): Result<T, "SentenceToUpperDash">;
1026
+ /**
1027
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to Train-Case.
1028
+ *
1029
+ * @example
1030
+ * ```ts
1031
+ * sentenceToTrain('Hello world'); // 'Hello-World'
1032
+ * sentenceToTrain({ 'First name': 'John' }); // { 'First-Name': 'John' }
1033
+ * ```
1034
+ *
1035
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
1036
+ * so results differ for keys like `userID` (see the migration notes in the README).
1037
+ */
1038
+ export declare function sentenceToTrain<T extends object | string>(input: T): Result<T, "SentenceToTrain">;
1039
+ /**
1040
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to dot.case.
1041
+ *
1042
+ * @example
1043
+ * ```ts
1044
+ * sentenceToDot('Hello world'); // 'hello.world'
1045
+ * sentenceToDot({ 'First name': 'John' }); // { 'first.name': 'John' }
1046
+ * ```
1047
+ *
1048
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
1049
+ * so results differ for keys like `userID` (see the migration notes in the README).
1050
+ */
1051
+ export declare function sentenceToDot<T extends object | string>(input: T): Result<T, "SentenceToDot">;
1052
+ /**
1053
+ * Converts a string, or the keys of an object/array (deeply), from Sentence case to Title Case.
1054
+ *
1055
+ * @example
1056
+ * ```ts
1057
+ * sentenceToTitle('Hello world'); // 'Hello World'
1058
+ * sentenceToTitle({ 'First name': 'John' }); // { 'First Name': 'John' }
1059
+ * ```
1060
+ *
1061
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
1062
+ * so results differ for keys like `userID` (see the migration notes in the README).
1063
+ */
1064
+ export declare function sentenceToTitle<T extends object | string>(input: T): Result<T, "SentenceToTitle">;
507
1065
  //#endregion
508
1066
  //#region src/upperDashCase/upperDashCase.d.ts
509
1067
  /**
@@ -514,6 +1072,9 @@ export declare function dotToTrain<T extends object | string>(input: T): Result<
514
1072
  * upperDashToCamel('HELLO-WORLD'); // 'helloWorld'
515
1073
  * upperDashToCamel({ 'FIRST-NAME': 'John' }); // { firstName: 'John' }
516
1074
  * ```
1075
+ *
1076
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
1077
+ * so results differ for keys like `userID` (see the migration notes in the README).
517
1078
  */
518
1079
  export declare function upperDashToCamel<T extends object | string>(input: T): Result<T, "UpperDashToCamel">;
519
1080
  /**
@@ -524,6 +1085,9 @@ export declare function upperDashToCamel<T extends object | string>(input: T): R
524
1085
  * upperDashToSnake('HELLO-WORLD'); // 'hello_world'
525
1086
  * upperDashToSnake({ 'FIRST-NAME': 'John' }); // { first_name: 'John' }
526
1087
  * ```
1088
+ *
1089
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
1090
+ * so results differ for keys like `userID` (see the migration notes in the README).
527
1091
  */
528
1092
  export declare function upperDashToSnake<T extends object | string>(input: T): Result<T, "UpperDashToSnake">;
529
1093
  /**
@@ -534,6 +1098,9 @@ export declare function upperDashToSnake<T extends object | string>(input: T): R
534
1098
  * upperDashToDash('HELLO-WORLD'); // 'hello-world'
535
1099
  * upperDashToDash({ 'FIRST-NAME': 'John' }); // { 'first-name': 'John' }
536
1100
  * ```
1101
+ *
1102
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
1103
+ * so results differ for keys like `userID` (see the migration notes in the README).
537
1104
  */
538
1105
  export declare function upperDashToDash<T extends object | string>(input: T): Result<T, "UpperDashToDash">;
539
1106
  /**
@@ -544,6 +1111,9 @@ export declare function upperDashToDash<T extends object | string>(input: T): Re
544
1111
  * upperDashToPascal('HELLO-WORLD'); // 'HelloWorld'
545
1112
  * upperDashToPascal({ 'FIRST-NAME': 'John' }); // { FirstName: 'John' }
546
1113
  * ```
1114
+ *
1115
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
1116
+ * so results differ for keys like `userID` (see the migration notes in the README).
547
1117
  */
548
1118
  export declare function upperDashToPascal<T extends object | string>(input: T): Result<T, "UpperDashToPascal">;
549
1119
  /**
@@ -554,6 +1124,9 @@ export declare function upperDashToPascal<T extends object | string>(input: T):
554
1124
  * upperDashToUpperSnake('HELLO-WORLD'); // 'HELLO_WORLD'
555
1125
  * upperDashToUpperSnake({ 'FIRST-NAME': 'John' }); // { FIRST_NAME: 'John' }
556
1126
  * ```
1127
+ *
1128
+ * @deprecated Use `toUpperSnake` instead, which converts from any case. It keeps acronyms together,
1129
+ * so results differ for keys like `userID` (see the migration notes in the README).
557
1130
  */
558
1131
  export declare function upperDashToUpperSnake<T extends object | string>(input: T): Result<T, "UpperDashToUpperSnake">;
559
1132
  /**
@@ -564,6 +1137,9 @@ export declare function upperDashToUpperSnake<T extends object | string>(input:
564
1137
  * upperDashToTrain('HELLO-WORLD'); // 'Hello-World'
565
1138
  * upperDashToTrain({ 'FIRST-NAME': 'John' }); // { 'First-Name': 'John' }
566
1139
  * ```
1140
+ *
1141
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
1142
+ * so results differ for keys like `userID` (see the migration notes in the README).
567
1143
  */
568
1144
  export declare function upperDashToTrain<T extends object | string>(input: T): Result<T, "UpperDashToTrain">;
569
1145
  /**
@@ -574,8 +1150,37 @@ export declare function upperDashToTrain<T extends object | string>(input: T): R
574
1150
  * upperDashToDot('HELLO-WORLD'); // 'hello.world'
575
1151
  * upperDashToDot({ 'FIRST-NAME': 'John' }); // { 'first.name': 'John' }
576
1152
  * ```
1153
+ *
1154
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
1155
+ * so results differ for keys like `userID` (see the migration notes in the README).
577
1156
  */
578
1157
  export declare function upperDashToDot<T extends object | string>(input: T): Result<T, "UpperDashToDot">;
1158
+ /**
1159
+ * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to Title Case.
1160
+ *
1161
+ * @example
1162
+ * ```ts
1163
+ * upperDashToTitle('HELLO-WORLD'); // 'Hello World'
1164
+ * upperDashToTitle({ 'FIRST-NAME': 'John' }); // { 'First Name': 'John' }
1165
+ * ```
1166
+ *
1167
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
1168
+ * so results differ for keys like `userID` (see the migration notes in the README).
1169
+ */
1170
+ export declare function upperDashToTitle<T extends object | string>(input: T): Result<T, "UpperDashToTitle">;
1171
+ /**
1172
+ * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to Sentence case.
1173
+ *
1174
+ * @example
1175
+ * ```ts
1176
+ * upperDashToSentence('HELLO-WORLD'); // 'Hello world'
1177
+ * upperDashToSentence({ 'FIRST-NAME': 'John' }); // { 'First name': 'John' }
1178
+ * ```
1179
+ *
1180
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
1181
+ * so results differ for keys like `userID` (see the migration notes in the README).
1182
+ */
1183
+ export declare function upperDashToSentence<T extends object | string>(input: T): Result<T, "UpperDashToSentence">;
579
1184
  //#endregion
580
1185
  //#region src/upperSnakeCase/upperSnakeCase.d.ts
581
1186
  /**
@@ -586,6 +1191,9 @@ export declare function upperDashToDot<T extends object | string>(input: T): Res
586
1191
  * upperSnakeToCamel('HELLO_WORLD'); // 'helloWorld'
587
1192
  * upperSnakeToCamel({ FIRST_NAME: 'John' }); // { firstName: 'John' }
588
1193
  * ```
1194
+ *
1195
+ * @deprecated Use `toCamel` instead, which converts from any case. It keeps acronyms together,
1196
+ * so results differ for keys like `userID` (see the migration notes in the README).
589
1197
  */
590
1198
  export declare function upperSnakeToCamel<T extends object | string>(input: T): Result<T, "UpperSnakeToCamel">;
591
1199
  /**
@@ -596,6 +1204,9 @@ export declare function upperSnakeToCamel<T extends object | string>(input: T):
596
1204
  * upperSnakeToSnake('HELLO_WORLD'); // 'hello_world'
597
1205
  * upperSnakeToSnake({ FIRST_NAME: 'John' }); // { first_name: 'John' }
598
1206
  * ```
1207
+ *
1208
+ * @deprecated Use `toSnake` instead, which converts from any case. It keeps acronyms together,
1209
+ * so results differ for keys like `userID` (see the migration notes in the README).
599
1210
  */
600
1211
  export declare function upperSnakeToSnake<T extends object | string>(input: T): Result<T, "UpperSnakeToSnake">;
601
1212
  /**
@@ -606,6 +1217,9 @@ export declare function upperSnakeToSnake<T extends object | string>(input: T):
606
1217
  * upperSnakeToDash('HELLO_WORLD'); // 'hello-world'
607
1218
  * upperSnakeToDash({ FIRST_NAME: 'John' }); // { 'first-name': 'John' }
608
1219
  * ```
1220
+ *
1221
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
1222
+ * so results differ for keys like `userID` (see the migration notes in the README).
609
1223
  */
610
1224
  export declare function upperSnakeToDash<T extends object | string>(input: T): Result<T, "UpperSnakeToDash">;
611
1225
  /**
@@ -616,6 +1230,9 @@ export declare function upperSnakeToDash<T extends object | string>(input: T): R
616
1230
  * upperSnakeToPascal('HELLO_WORLD'); // 'HelloWorld'
617
1231
  * upperSnakeToPascal({ FIRST_NAME: 'John' }); // { FirstName: 'John' }
618
1232
  * ```
1233
+ *
1234
+ * @deprecated Use `toPascal` instead, which converts from any case. It keeps acronyms together,
1235
+ * so results differ for keys like `userID` (see the migration notes in the README).
619
1236
  */
620
1237
  export declare function upperSnakeToPascal<T extends object | string>(input: T): Result<T, "UpperSnakeToPascal">;
621
1238
  /**
@@ -626,6 +1243,9 @@ export declare function upperSnakeToPascal<T extends object | string>(input: T):
626
1243
  * upperSnakeToUpperDash('HELLO_WORLD'); // 'HELLO-WORLD'
627
1244
  * upperSnakeToUpperDash({ FIRST_NAME: 'John' }); // { 'FIRST-NAME': 'John' }
628
1245
  * ```
1246
+ *
1247
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
1248
+ * so results differ for keys like `userID` (see the migration notes in the README).
629
1249
  */
630
1250
  export declare function upperSnakeToUpperDash<T extends object | string>(input: T): Result<T, "UpperSnakeToUpperDash">;
631
1251
  /**
@@ -636,6 +1256,9 @@ export declare function upperSnakeToUpperDash<T extends object | string>(input:
636
1256
  * upperSnakeToTrain('HELLO_WORLD'); // 'Hello-World'
637
1257
  * upperSnakeToTrain({ FIRST_NAME: 'John' }); // { 'First-Name': 'John' }
638
1258
  * ```
1259
+ *
1260
+ * @deprecated Use `toTrain` instead, which converts from any case. It keeps acronyms together,
1261
+ * so results differ for keys like `userID` (see the migration notes in the README).
639
1262
  */
640
1263
  export declare function upperSnakeToTrain<T extends object | string>(input: T): Result<T, "UpperSnakeToTrain">;
641
1264
  /**
@@ -646,7 +1269,161 @@ export declare function upperSnakeToTrain<T extends object | string>(input: T):
646
1269
  * upperSnakeToDot('HELLO_WORLD'); // 'hello.world'
647
1270
  * upperSnakeToDot({ FIRST_NAME: 'John' }); // { 'first.name': 'John' }
648
1271
  * ```
1272
+ *
1273
+ * @deprecated Use `toDot` instead, which converts from any case. It keeps acronyms together,
1274
+ * so results differ for keys like `userID` (see the migration notes in the README).
649
1275
  */
650
1276
  export declare function upperSnakeToDot<T extends object | string>(input: T): Result<T, "UpperSnakeToDot">;
1277
+ /**
1278
+ * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to Title Case.
1279
+ *
1280
+ * @example
1281
+ * ```ts
1282
+ * upperSnakeToTitle('HELLO_WORLD'); // 'Hello World'
1283
+ * upperSnakeToTitle({ FIRST_NAME: 'John' }); // { 'First Name': 'John' }
1284
+ * ```
1285
+ *
1286
+ * @deprecated Use `toTitle` instead, which converts from any case. It keeps acronyms together,
1287
+ * so results differ for keys like `userID` (see the migration notes in the README).
1288
+ */
1289
+ export declare function upperSnakeToTitle<T extends object | string>(input: T): Result<T, "UpperSnakeToTitle">;
1290
+ /**
1291
+ * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to Sentence case.
1292
+ *
1293
+ * @example
1294
+ * ```ts
1295
+ * upperSnakeToSentence('HELLO_WORLD'); // 'Hello world'
1296
+ * upperSnakeToSentence({ FIRST_NAME: 'John' }); // { 'First name': 'John' }
1297
+ * ```
1298
+ *
1299
+ * @deprecated Use `toSentence` instead, which converts from any case. It keeps acronyms together,
1300
+ * so results differ for keys like `userID` (see the migration notes in the README).
1301
+ */
1302
+ export declare function upperSnakeToSentence<T extends object | string>(input: T): Result<T, "UpperSnakeToSentence">;
1303
+ //#endregion
1304
+ //#region src/anyCase/types.d.ts
1305
+ type Separator = "_" | "-" | "." | " ";
1306
+ type IsUpper<C extends string> = C extends Lowercase<C> ? false : true;
1307
+ type IsLower<C extends string> = C extends Uppercase<C> ? false : true;
1308
+ type Push<W extends string[], Word extends string> = Word extends "" ? W : [...W, Lowercase<Word>];
1309
+ /**
1310
+ * Splits a string into lowercase words, the same way `words()` does at runtime:
1311
+ * on `_`, `-`, `.` and spaces, before an uppercase letter that follows a lowercase
1312
+ * letter or a digit (`helloWorld`), and before the last letter of an acronym (`XMLHttp`).
1313
+ */
1314
+ type Words<T extends string, W extends string[] = [], Word extends string = "", Prev extends string = ""> = T extends `${infer C}${infer Rest}` ? C extends Separator ? Words<Rest, Push<W, Word>, "", ""> : IsUpper<C> extends true ? Word extends "" ? Words<Rest, W, C, C> : IsUpper<Prev> extends false ? Words<Rest, Push<W, Word>, C, C> : Rest extends `${infer Next}${string}` ? IsLower<Next> extends true ? Words<Rest, Push<W, Word>, C, C> : Words<Rest, W, `${Word}${C}`, C> : Words<Rest, W, `${Word}${C}`, C> : Words<Rest, W, `${Word}${C}`, C> : Push<W, Word>;
1315
+ type Join<W, S extends string> = W extends [infer A] ? A & string : W extends [infer A, ...infer R] ? `${A & string}${S}${Join<R, S>}` : "";
1316
+ type CapitalizeAll<W> = { [K in keyof W]: Capitalize<W[K] & string>; };
1317
+ type CamelWords<W> = W extends [infer F, ...infer R] ? `${F & string}${Join<CapitalizeAll<R>, "">}` : "";
1318
+ /** A case that the `toX` functions (e.g. `toSnake`) convert to. */
1319
+ type Case = "Camel" | "Pascal" | "Snake" | "Dash" | "UpperSnake" | "UpperDash" | "Train" | "Dot" | "Title" | "Sentence";
1320
+ type ConvertKey<K extends string, C extends Case> = string extends K ? string : C extends "Camel" ? CamelWords<Words<K>> : C extends "Pascal" ? Join<CapitalizeAll<Words<K>>, ""> : C extends "Snake" ? Join<Words<K>, "_"> : C extends "Dash" ? Join<Words<K>, "-"> : C extends "UpperSnake" ? Uppercase<Join<Words<K>, "_">> : C extends "UpperDash" ? Uppercase<Join<Words<K>, "-">> : C extends "Train" ? Join<CapitalizeAll<Words<K>>, "-"> : C extends "Dot" ? Join<Words<K>, "."> : C extends "Title" ? Join<CapitalizeAll<Words<K>>, " "> : C extends "Sentence" ? Capitalize<Join<Words<K>, " ">> : never;
1321
+ /**
1322
+ * The type returned by a `toX` function: strings stay `string`, and object keys
1323
+ * in any case (deeply, including inside arrays) are renamed to the case `C`.
1324
+ */
1325
+ type CaseResult<T, C extends Case> = T extends string ? string : T extends Array<unknown> ? { [K in keyof T]: CaseResult<T[K], C>; } : T extends object ? Prettify<{ [K in keyof T as ConvertKey<K & string, C>]: CaseResult<T[K], C>; }> : T;
1326
+ //#endregion
1327
+ //#region src/anyCase/anyCase.d.ts
1328
+ /**
1329
+ * Converts a string, or the keys of an object/array (deeply), from any case to camelCase.
1330
+ *
1331
+ * @example
1332
+ * ```ts
1333
+ * toCamel('hello_world'); // 'helloWorld'
1334
+ * toCamel({ first_name: 'John', userID: 1 }); // { firstName: 'John', userId: 1 }
1335
+ * ```
1336
+ */
1337
+ export declare function toCamel<T extends object | string>(input: T): CaseResult<T, "Camel">;
1338
+ /**
1339
+ * Converts a string, or the keys of an object/array (deeply), from any case to PascalCase.
1340
+ *
1341
+ * @example
1342
+ * ```ts
1343
+ * toPascal('hello-world'); // 'HelloWorld'
1344
+ * toPascal({ 'first-name': 'John', userID: 1 }); // { FirstName: 'John', UserId: 1 }
1345
+ * ```
1346
+ */
1347
+ export declare function toPascal<T extends object | string>(input: T): CaseResult<T, "Pascal">;
1348
+ /**
1349
+ * Converts a string, or the keys of an object/array (deeply), from any case to snake_case.
1350
+ *
1351
+ * @example
1352
+ * ```ts
1353
+ * toSnake('helloWorld'); // 'hello_world'
1354
+ * toSnake({ firstName: 'John', userID: 1 }); // { first_name: 'John', user_id: 1 }
1355
+ * ```
1356
+ */
1357
+ export declare function toSnake<T extends object | string>(input: T): CaseResult<T, "Snake">;
1358
+ /**
1359
+ * Converts a string, or the keys of an object/array (deeply), from any case to dash-case.
1360
+ *
1361
+ * @example
1362
+ * ```ts
1363
+ * toDash('HELLO_WORLD'); // 'hello-world'
1364
+ * toDash({ FIRST_NAME: 'John', userID: 1 }); // { 'first-name': 'John', 'user-id': 1 }
1365
+ * ```
1366
+ */
1367
+ export declare function toDash<T extends object | string>(input: T): CaseResult<T, "Dash">;
1368
+ /**
1369
+ * Converts a string, or the keys of an object/array (deeply), from any case to UPPER_SNAKE_CASE.
1370
+ *
1371
+ * @example
1372
+ * ```ts
1373
+ * toUpperSnake('hello-world'); // 'HELLO_WORLD'
1374
+ * toUpperSnake({ 'first-name': 'John', userID: 1 }); // { FIRST_NAME: 'John', USER_ID: 1 }
1375
+ * ```
1376
+ */
1377
+ export declare function toUpperSnake<T extends object | string>(input: T): CaseResult<T, "UpperSnake">;
1378
+ /**
1379
+ * Converts a string, or the keys of an object/array (deeply), from any case to UPPER-DASH-CASE.
1380
+ *
1381
+ * @example
1382
+ * ```ts
1383
+ * toUpperDash('helloWorld'); // 'HELLO-WORLD'
1384
+ * toUpperDash({ firstName: 'John', userID: 1 }); // { 'FIRST-NAME': 'John', 'USER-ID': 1 }
1385
+ * ```
1386
+ */
1387
+ export declare function toUpperDash<T extends object | string>(input: T): CaseResult<T, "UpperDash">;
1388
+ /**
1389
+ * Converts a string, or the keys of an object/array (deeply), from any case to Train-Case.
1390
+ *
1391
+ * @example
1392
+ * ```ts
1393
+ * toTrain('hello_world'); // 'Hello-World'
1394
+ * toTrain({ first_name: 'John', userID: 1 }); // { 'First-Name': 'John', 'User-Id': 1 }
1395
+ * ```
1396
+ */
1397
+ export declare function toTrain<T extends object | string>(input: T): CaseResult<T, "Train">;
1398
+ /**
1399
+ * Converts a string, or the keys of an object/array (deeply), from any case to dot.case.
1400
+ *
1401
+ * @example
1402
+ * ```ts
1403
+ * toDot('HelloWorld'); // 'hello.world'
1404
+ * toDot({ FirstName: 'John', userID: 1 }); // { 'first.name': 'John', 'user.id': 1 }
1405
+ * ```
1406
+ */
1407
+ export declare function toDot<T extends object | string>(input: T): CaseResult<T, "Dot">;
1408
+ /**
1409
+ * Converts a string, or the keys of an object/array (deeply), from any case to Title Case.
1410
+ *
1411
+ * @example
1412
+ * ```ts
1413
+ * toTitle('hello_world'); // 'Hello World'
1414
+ * toTitle({ first_name: 'John', userID: 1 }); // { 'First Name': 'John', 'User Id': 1 }
1415
+ * ```
1416
+ */
1417
+ export declare function toTitle<T extends object | string>(input: T): CaseResult<T, "Title">;
1418
+ /**
1419
+ * Converts a string, or the keys of an object/array (deeply), from any case to Sentence case.
1420
+ *
1421
+ * @example
1422
+ * ```ts
1423
+ * toSentence('helloWorld'); // 'Hello world'
1424
+ * toSentence({ firstName: 'John', userID: 1 }); // { 'First name': 'John', 'User id': 1 }
1425
+ * ```
1426
+ */
1427
+ export declare function toSentence<T extends object | string>(input: T): CaseResult<T, "Sentence">;
651
1428
  //#endregion
652
- export type { ParserType, Prettify, Result };
1429
+ export type { Case, CaseResult, ParserType, Prettify, Result };