caseparser 5.1.0 → 6.0.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.cts CHANGED
@@ -1,1307 +1,6 @@
1
- //#region src/types.d.ts
2
- type CamelToDash<T extends string> = T extends `${infer L}${infer R}` ? `${L extends Capitalize<L> ? "-" : ""}${Lowercase<L>}${CamelToDash<R>}` : T;
3
- type CamelToPascal<T extends string> = Capitalize<T>;
4
- type CamelToSnake<T extends string> = T extends `${infer L}${infer R}` ? `${L extends Capitalize<L> ? "_" : ""}${Lowercase<L>}${CamelToSnake<R>}` : T;
5
- type CamelToUpperDash<T extends string> = Uppercase<CamelToDash<T>>;
6
- type CamelToUpperSnake<T extends string> = Uppercase<CamelToSnake<T>>;
7
- type CamelToTrain<T extends string> = DashToTrain<CamelToDash<T>>;
8
- type CamelToDot<T extends string> = DashToDot<CamelToDash<T>>;
9
- type DashToCamel<T extends string> = T extends `${infer L}-${infer R}` ? `${L}${Capitalize<DashToCamel<R>>}` : T;
10
- type DashToPascal<T extends string> = Capitalize<DashToCamel<T>>;
11
- type DashToSnake<T extends string> = T extends `${infer L}-${infer R}` ? `${L}_${DashToSnake<R>}` : T;
12
- type DashToUpperDash<T extends string> = Uppercase<T>;
13
- type DashToUpperSnake<T extends string> = Uppercase<DashToSnake<T>>;
14
- type DashToTrain<T extends string> = T extends `${infer L}-${infer R}` ? `${Capitalize<L>}-${DashToTrain<R>}` : Capitalize<T>;
15
- type DashToDot<T extends string> = T extends `${infer L}-${infer R}` ? `${L}.${DashToDot<R>}` : T;
16
- type PascalToCamel<T extends string> = Uncapitalize<T>;
17
- type PascalToDash<T extends string> = CamelToDash<Uncapitalize<T>>;
18
- type PascalToSnake<T extends string> = CamelToSnake<Uncapitalize<T>>;
19
- type PascalToUpperDash<T extends string> = Uppercase<PascalToDash<T>>;
20
- type PascalToUpperSnake<T extends string> = Uppercase<PascalToSnake<T>>;
21
- type PascalToTrain<T extends string> = DashToTrain<PascalToDash<T>>;
22
- type PascalToDot<T extends string> = DashToDot<PascalToDash<T>>;
23
- type SnakeToCamel<T extends string> = T extends `${infer L}_${infer R}` ? `${L}${Capitalize<SnakeToCamel<R>>}` : T;
24
- type SnakeToDash<T extends string> = T extends `${infer L}_${infer R}` ? `${L}-${SnakeToDash<R>}` : T;
25
- type SnakeToPascal<T extends string> = Capitalize<SnakeToCamel<T>>;
26
- type SnakeToUpperDash<T extends string> = Uppercase<SnakeToDash<T>>;
27
- type SnakeToUpperSnake<T extends string> = Uppercase<T>;
28
- type SnakeToTrain<T extends string> = DashToTrain<SnakeToDash<T>>;
29
- type SnakeToDot<T extends string> = DashToDot<SnakeToDash<T>>;
30
- type UpperDashToCamel<T extends string> = DashToCamel<Lowercase<T>>;
31
- type UpperDashToDash<T extends string> = Lowercase<T>;
32
- type UpperDashToPascal<T extends string> = Capitalize<UpperDashToCamel<T>>;
33
- type UpperDashToSnake<T extends string> = DashToSnake<UpperDashToDash<T>>;
34
- type UpperDashToUpperSnake<T extends string> = Uppercase<UpperDashToSnake<T>>;
35
- type UpperDashToTrain<T extends string> = DashToTrain<UpperDashToDash<T>>;
36
- type UpperDashToDot<T extends string> = DashToDot<UpperDashToDash<T>>;
37
- type UpperSnakeToCamel<T extends string> = SnakeToCamel<Lowercase<T>>;
38
- type UpperSnakeToDash<T extends string> = SnakeToDash<Lowercase<T>>;
39
- type UpperSnakeToPascal<T extends string> = SnakeToPascal<Lowercase<T>>;
40
- type UpperSnakeToSnake<T extends string> = Lowercase<T>;
41
- type UpperSnakeToUpperDash<T extends string> = Uppercase<UpperSnakeToDash<T>>;
42
- type UpperSnakeToTrain<T extends string> = DashToTrain<UpperSnakeToDash<T>>;
43
- type UpperSnakeToDot<T extends string> = DashToDot<UpperSnakeToDash<T>>;
44
- type TrainToCamel<T extends string> = DashToCamel<TrainToDash<T>>;
45
- type TrainToDash<T extends string> = Lowercase<T>;
46
- type TrainToDot<T extends string> = DashToDot<TrainToDash<T>>;
47
- type TrainToPascal<T extends string> = DashToPascal<TrainToDash<T>>;
48
- type TrainToSnake<T extends string> = DashToSnake<TrainToDash<T>>;
49
- type TrainToUpperDash<T extends string> = Uppercase<T>;
50
- type TrainToUpperSnake<T extends string> = DashToUpperSnake<TrainToDash<T>>;
51
- type DotToCamel<T extends string> = DashToCamel<DotToDash<T>>;
52
- type DotToDash<T extends string> = T extends `${infer L}.${infer R}` ? `${L}-${DotToDash<R>}` : T;
53
- type DotToPascal<T extends string> = DashToPascal<DotToDash<T>>;
54
- type DotToSnake<T extends string> = DashToSnake<DotToDash<T>>;
55
- type DotToTrain<T extends string> = DashToTrain<DotToDash<T>>;
56
- type DotToUpperDash<T extends string> = Uppercase<DotToDash<T>>;
57
- type DotToUpperSnake<T extends string> = DashToUpperSnake<DotToDash<T>>;
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";
104
- /** Identifies a conversion, e.g. `'CamelToSnake'`. */
105
- type ParserType = ParserCamelType | ParserDashType | ParserPascalType | ParserSnakeType | ParserUpperDashType | ParserUpperSnakeType | ParserTrainType | ParserDotType | ParserTitleType | ParserSentenceType;
106
- /** Flattens an intersection/mapped type so editors show the resulting keys. */
107
- type Prettify<T> = { [K in keyof T]: T[K]; } & {};
108
- /**
109
- * The type returned by a conversion: strings stay `string`, and object keys
110
- * (deeply, including inside arrays) are renamed according to the conversion `P`.
111
- */
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;
113
- //#endregion
114
- //#region src/camelCase/camelCase.d.ts
115
- /**
116
- * Converts a string, or the keys of an object/array (deeply), from camelCase to dash-case.
117
- *
118
- * @example
119
- * ```ts
120
- * camelToDash('helloWorld'); // 'hello-world'
121
- * camelToDash({ firstName: 'John' }); // { 'first-name': 'John' }
122
- * ```
123
- *
124
- * @deprecated Use `toKebab` 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).
126
- */
127
- export declare function camelToDash<T extends object | string>(input: T): Result<T, "CamelToDash">;
128
- /**
129
- * Converts a string, or the keys of an object/array (deeply), from camelCase to snake_case.
130
- *
131
- * @example
132
- * ```ts
133
- * camelToSnake('helloWorld'); // 'hello_world'
134
- * camelToSnake({ firstName: 'John' }); // { first_name: 'John' }
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).
139
- */
140
- export declare function camelToSnake<T extends object | string>(input: T): Result<T, "CamelToSnake">;
141
- /**
142
- * Converts a string, or the keys of an object/array (deeply), from camelCase to PascalCase.
143
- *
144
- * @example
145
- * ```ts
146
- * camelToPascal('helloWorld'); // 'HelloWorld'
147
- * camelToPascal({ firstName: 'John' }); // { FirstName: 'John' }
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).
152
- */
153
- export declare function camelToPascal<T extends object | string>(input: T): Result<T, "CamelToPascal">;
154
- /**
155
- * Converts a string, or the keys of an object/array (deeply), from camelCase to UPPER_SNAKE_CASE.
156
- *
157
- * @example
158
- * ```ts
159
- * camelToUpperSnake('helloWorld'); // 'HELLO_WORLD'
160
- * camelToUpperSnake({ firstName: 'John' }); // { FIRST_NAME: 'John' }
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).
165
- */
166
- export declare function camelToUpperSnake<T extends object | string>(input: T): Result<T, "CamelToUpperSnake">;
167
- /**
168
- * Converts a string, or the keys of an object/array (deeply), from camelCase to UPPER-DASH-CASE.
169
- *
170
- * @example
171
- * ```ts
172
- * camelToUpperDash('helloWorld'); // 'HELLO-WORLD'
173
- * camelToUpperDash({ firstName: 'John' }); // { 'FIRST-NAME': 'John' }
174
- * ```
175
- *
176
- * @deprecated Use `toUpperKebab` 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).
178
- */
179
- export declare function camelToUpperDash<T extends object | string>(input: T): Result<T, "CamelToUpperDash">;
180
- /**
181
- * Converts a string, or the keys of an object/array (deeply), from camelCase to Train-Case.
182
- *
183
- * @example
184
- * ```ts
185
- * camelToTrain('helloWorld'); // 'Hello-World'
186
- * camelToTrain({ firstName: 'John' }); // { 'First-Name': 'John' }
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).
191
- */
192
- export declare function camelToTrain<T extends object | string>(input: T): Result<T, "CamelToTrain">;
193
- /**
194
- * Converts a string, or the keys of an object/array (deeply), from camelCase to dot.case.
195
- *
196
- * @example
197
- * ```ts
198
- * camelToDot('helloWorld'); // 'hello.world'
199
- * camelToDot({ firstName: 'John' }); // { 'first.name': 'John' }
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).
204
- */
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">;
232
- //#endregion
233
- //#region src/dashCase/dashCase.d.ts
234
- /**
235
- * Converts a string, or the keys of an object/array (deeply), from dash-case to snake_case.
236
- *
237
- * @example
238
- * ```ts
239
- * dashToSnake('hello-world'); // 'hello_world'
240
- * dashToSnake({ 'first-name': 'John' }); // { first_name: 'John' }
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).
245
- */
246
- export declare function dashToSnake<T extends object | string>(input: T): Result<T, "DashToSnake">;
247
- /**
248
- * Converts a string, or the keys of an object/array (deeply), from dash-case to camelCase.
249
- *
250
- * @example
251
- * ```ts
252
- * dashToCamel('hello-world'); // 'helloWorld'
253
- * dashToCamel({ 'first-name': 'John' }); // { firstName: 'John' }
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).
258
- */
259
- export declare function dashToCamel<T extends object | string>(input: T): Result<T, "DashToCamel">;
260
- /**
261
- * Converts a string, or the keys of an object/array (deeply), from dash-case to PascalCase.
262
- *
263
- * @example
264
- * ```ts
265
- * dashToPascal('hello-world'); // 'HelloWorld'
266
- * dashToPascal({ 'first-name': 'John' }); // { FirstName: 'John' }
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).
271
- */
272
- export declare function dashToPascal<T extends object | string>(input: T): Result<T, "DashToPascal">;
273
- /**
274
- * Converts a string, or the keys of an object/array (deeply), from dash-case to UPPER_SNAKE_CASE.
275
- *
276
- * @example
277
- * ```ts
278
- * dashToUpperSnake('hello-world'); // 'HELLO_WORLD'
279
- * dashToUpperSnake({ 'first-name': 'John' }); // { FIRST_NAME: 'John' }
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).
284
- */
285
- export declare function dashToUpperSnake<T extends object | string>(input: T): Result<T, "DashToUpperSnake">;
286
- /**
287
- * Converts a string, or the keys of an object/array (deeply), from dash-case to UPPER-DASH-CASE.
288
- *
289
- * @example
290
- * ```ts
291
- * dashToUpperDash('hello-world'); // 'HELLO-WORLD'
292
- * dashToUpperDash({ 'first-name': 'John' }); // { 'FIRST-NAME': 'John' }
293
- * ```
294
- *
295
- * @deprecated Use `toUpperKebab` 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).
297
- */
298
- export declare function dashToUpperDash<T extends object | string>(input: T): Result<T, "DashToUpperDash">;
299
- /**
300
- * Converts a string, or the keys of an object/array (deeply), from dash-case to Train-Case.
301
- *
302
- * @example
303
- * ```ts
304
- * dashToTrain('hello-world'); // 'Hello-World'
305
- * dashToTrain({ 'first-name': 'John' }); // { 'First-Name': 'John' }
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).
310
- */
311
- export declare function dashToTrain<T extends object | string>(input: T): Result<T, "DashToTrain">;
312
- /**
313
- * Converts a string, or the keys of an object/array (deeply), from dash-case to dot.case.
314
- *
315
- * @example
316
- * ```ts
317
- * dashToDot('hello-world'); // 'hello.world'
318
- * dashToDot({ 'first-name': 'John' }); // { 'first.name': 'John' }
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).
323
- */
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">;
351
- //#endregion
352
- //#region src/pascalCase/pascalCase.d.ts
353
- /**
354
- * Converts a string, or the keys of an object/array (deeply), from PascalCase to camelCase.
355
- *
356
- * @example
357
- * ```ts
358
- * pascalToCamel('HelloWorld'); // 'helloWorld'
359
- * pascalToCamel({ FirstName: 'John' }); // { firstName: 'John' }
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).
364
- */
365
- export declare function pascalToCamel<T extends object | string>(input: T): Result<T, "PascalToCamel">;
366
- /**
367
- * Converts a string, or the keys of an object/array (deeply), from PascalCase to snake_case.
368
- *
369
- * @example
370
- * ```ts
371
- * pascalToSnake('HelloWorld'); // 'hello_world'
372
- * pascalToSnake({ FirstName: 'John' }); // { first_name: 'John' }
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).
377
- */
378
- export declare function pascalToSnake<T extends object | string>(input: T): Result<T, "PascalToSnake">;
379
- /**
380
- * Converts a string, or the keys of an object/array (deeply), from PascalCase to dash-case.
381
- *
382
- * @example
383
- * ```ts
384
- * pascalToDash('HelloWorld'); // 'hello-world'
385
- * pascalToDash({ FirstName: 'John' }); // { 'first-name': 'John' }
386
- * ```
387
- *
388
- * @deprecated Use `toKebab` 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).
390
- */
391
- export declare function pascalToDash<T extends object | string>(input: T): Result<T, "PascalToDash">;
392
- /**
393
- * Converts a string, or the keys of an object/array (deeply), from PascalCase to UPPER_SNAKE_CASE.
394
- *
395
- * @example
396
- * ```ts
397
- * pascalToUpperSnake('HelloWorld'); // 'HELLO_WORLD'
398
- * pascalToUpperSnake({ FirstName: 'John' }); // { FIRST_NAME: 'John' }
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).
403
- */
404
- export declare function pascalToUpperSnake<T extends object | string>(input: T): Result<T, "PascalToUpperSnake">;
405
- /**
406
- * Converts a string, or the keys of an object/array (deeply), from PascalCase to UPPER-DASH-CASE.
407
- *
408
- * @example
409
- * ```ts
410
- * pascalToUpperDash('HelloWorld'); // 'HELLO-WORLD'
411
- * pascalToUpperDash({ FirstName: 'John' }); // { 'FIRST-NAME': 'John' }
412
- * ```
413
- *
414
- * @deprecated Use `toUpperKebab` 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).
416
- */
417
- export declare function pascalToUpperDash<T extends object | string>(input: T): Result<T, "PascalToUpperDash">;
418
- /**
419
- * Converts a string, or the keys of an object/array (deeply), from PascalCase to Train-Case.
420
- *
421
- * @example
422
- * ```ts
423
- * pascalToTrain('HelloWorld'); // 'Hello-World'
424
- * pascalToTrain({ FirstName: 'John' }); // { 'First-Name': 'John' }
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).
429
- */
430
- export declare function pascalToTrain<T extends object | string>(input: T): Result<T, "PascalToTrain">;
431
- /**
432
- * Converts a string, or the keys of an object/array (deeply), from PascalCase to dot.case.
433
- *
434
- * @example
435
- * ```ts
436
- * pascalToDot('HelloWorld'); // 'hello.world'
437
- * pascalToDot({ FirstName: 'John' }); // { 'first.name': 'John' }
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).
442
- */
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">;
470
- //#endregion
471
- //#region src/snakeCase/snakeCase.d.ts
472
- /**
473
- * Converts a string, or the keys of an object/array (deeply), from snake_case to camelCase.
474
- *
475
- * @example
476
- * ```ts
477
- * snakeToCamel('hello_world'); // 'helloWorld'
478
- * snakeToCamel({ first_name: 'John' }); // { firstName: 'John' }
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).
483
- */
484
- export declare function snakeToCamel<T extends object | string>(input: T): Result<T, "SnakeToCamel">;
485
- /**
486
- * Converts a string, or the keys of an object/array (deeply), from snake_case to dash-case.
487
- *
488
- * @example
489
- * ```ts
490
- * snakeToDash('hello_world'); // 'hello-world'
491
- * snakeToDash({ first_name: 'John' }); // { 'first-name': 'John' }
492
- * ```
493
- *
494
- * @deprecated Use `toKebab` 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).
496
- */
497
- export declare function snakeToDash<T extends object | string>(input: T): Result<T, "SnakeToDash">;
498
- /**
499
- * Converts a string, or the keys of an object/array (deeply), from snake_case to PascalCase.
500
- *
501
- * @example
502
- * ```ts
503
- * snakeToPascal('hello_world'); // 'HelloWorld'
504
- * snakeToPascal({ first_name: 'John' }); // { FirstName: 'John' }
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).
509
- */
510
- export declare function snakeToPascal<T extends object | string>(input: T): Result<T, "SnakeToPascal">;
511
- /**
512
- * Converts a string, or the keys of an object/array (deeply), from snake_case to UPPER_SNAKE_CASE.
513
- *
514
- * @example
515
- * ```ts
516
- * snakeToUpperSnake('hello_world'); // 'HELLO_WORLD'
517
- * snakeToUpperSnake({ first_name: 'John' }); // { FIRST_NAME: 'John' }
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).
522
- */
523
- export declare function snakeToUpperSnake<T extends object | string>(input: T): Result<T, "SnakeToUpperSnake">;
524
- /**
525
- * Converts a string, or the keys of an object/array (deeply), from snake_case to UPPER-DASH-CASE.
526
- *
527
- * @example
528
- * ```ts
529
- * snakeToUpperDash('hello_world'); // 'HELLO-WORLD'
530
- * snakeToUpperDash({ first_name: 'John' }); // { 'FIRST-NAME': 'John' }
531
- * ```
532
- *
533
- * @deprecated Use `toUpperKebab` 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).
535
- */
536
- export declare function snakeToUpperDash<T extends object | string>(input: T): Result<T, "SnakeToUpperDash">;
537
- /**
538
- * Converts a string, or the keys of an object/array (deeply), from snake_case to Train-Case.
539
- *
540
- * @example
541
- * ```ts
542
- * snakeToTrain('hello_world'); // 'Hello-World'
543
- * snakeToTrain({ first_name: 'John' }); // { 'First-Name': 'John' }
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).
548
- */
549
- export declare function snakeToTrain<T extends object | string>(input: T): Result<T, "SnakeToTrain">;
550
- /**
551
- * Converts a string, or the keys of an object/array (deeply), from snake_case to dot.case.
552
- *
553
- * @example
554
- * ```ts
555
- * snakeToDot('hello_world'); // 'hello.world'
556
- * snakeToDot({ first_name: 'John' }); // { 'first.name': 'John' }
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).
561
- */
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">;
589
- //#endregion
590
- //#region src/trainCase/trainCase.d.ts
591
- /**
592
- * Converts a string, or the keys of an object/array (deeply), from Train-Case to camelCase.
593
- *
594
- * @example
595
- * ```ts
596
- * trainToCamel('Hello-World'); // 'helloWorld'
597
- * trainToCamel({ 'First-Name': 'John' }); // { firstName: 'John' }
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).
602
- */
603
- export declare function trainToCamel<T extends object | string>(input: T): Result<T, "TrainToCamel">;
604
- /**
605
- * Converts a string, or the keys of an object/array (deeply), from Train-Case to PascalCase.
606
- *
607
- * @example
608
- * ```ts
609
- * trainToPascal('Hello-World'); // 'HelloWorld'
610
- * trainToPascal({ 'First-Name': 'John' }); // { FirstName: 'John' }
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).
615
- */
616
- export declare function trainToPascal<T extends object | string>(input: T): Result<T, "TrainToPascal">;
617
- /**
618
- * Converts a string, or the keys of an object/array (deeply), from Train-Case to snake_case.
619
- *
620
- * @example
621
- * ```ts
622
- * trainToSnake('Hello-World'); // 'hello_world'
623
- * trainToSnake({ 'First-Name': 'John' }); // { first_name: 'John' }
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).
628
- */
629
- export declare function trainToSnake<T extends object | string>(input: T): Result<T, "TrainToSnake">;
630
- /**
631
- * Converts a string, or the keys of an object/array (deeply), from Train-Case to dash-case.
632
- *
633
- * @example
634
- * ```ts
635
- * trainToDash('Hello-World'); // 'hello-world'
636
- * trainToDash({ 'First-Name': 'John' }); // { 'first-name': 'John' }
637
- * ```
638
- *
639
- * @deprecated Use `toKebab` 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).
641
- */
642
- export declare function trainToDash<T extends object | string>(input: T): Result<T, "TrainToDash">;
643
- /**
644
- * Converts a string, or the keys of an object/array (deeply), from Train-Case to UPPER_SNAKE_CASE.
645
- *
646
- * @example
647
- * ```ts
648
- * trainToUpperSnake('Hello-World'); // 'HELLO_WORLD'
649
- * trainToUpperSnake({ 'First-Name': 'John' }); // { FIRST_NAME: 'John' }
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).
654
- */
655
- export declare function trainToUpperSnake<T extends object | string>(input: T): Result<T, "TrainToUpperSnake">;
656
- /**
657
- * Converts a string, or the keys of an object/array (deeply), from Train-Case to UPPER-DASH-CASE.
658
- *
659
- * @example
660
- * ```ts
661
- * trainToUpperDash('Hello-World'); // 'HELLO-WORLD'
662
- * trainToUpperDash({ 'First-Name': 'John' }); // { 'FIRST-NAME': 'John' }
663
- * ```
664
- *
665
- * @deprecated Use `toUpperKebab` 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).
667
- */
668
- export declare function trainToUpperDash<T extends object | string>(input: T): Result<T, "TrainToUpperDash">;
669
- /**
670
- * Converts a string, or the keys of an object/array (deeply), from Train-Case to dot.case.
671
- *
672
- * @example
673
- * ```ts
674
- * trainToDot('Hello-World'); // 'hello.world'
675
- * trainToDot({ 'First-Name': 'John' }); // { 'first.name': 'John' }
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).
680
- */
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">;
708
- //#endregion
709
- //#region src/dotCase/dotCase.d.ts
710
- /**
711
- * Converts a string, or the keys of an object/array (deeply), from dot.case to camelCase.
712
- *
713
- * @example
714
- * ```ts
715
- * dotToCamel('hello.world'); // 'helloWorld'
716
- * dotToCamel({ 'first.name': 'John' }); // { firstName: 'John' }
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).
721
- */
722
- export declare function dotToCamel<T extends object | string>(input: T): Result<T, "DotToCamel">;
723
- /**
724
- * Converts a string, or the keys of an object/array (deeply), from dot.case to PascalCase.
725
- *
726
- * @example
727
- * ```ts
728
- * dotToPascal('hello.world'); // 'HelloWorld'
729
- * dotToPascal({ 'first.name': 'John' }); // { FirstName: 'John' }
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).
734
- */
735
- export declare function dotToPascal<T extends object | string>(input: T): Result<T, "DotToPascal">;
736
- /**
737
- * Converts a string, or the keys of an object/array (deeply), from dot.case to snake_case.
738
- *
739
- * @example
740
- * ```ts
741
- * dotToSnake('hello.world'); // 'hello_world'
742
- * dotToSnake({ 'first.name': 'John' }); // { first_name: 'John' }
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).
747
- */
748
- export declare function dotToSnake<T extends object | string>(input: T): Result<T, "DotToSnake">;
749
- /**
750
- * Converts a string, or the keys of an object/array (deeply), from dot.case to dash-case.
751
- *
752
- * @example
753
- * ```ts
754
- * dotToDash('hello.world'); // 'hello-world'
755
- * dotToDash({ 'first.name': 'John' }); // { 'first-name': 'John' }
756
- * ```
757
- *
758
- * @deprecated Use `toKebab` 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).
760
- */
761
- export declare function dotToDash<T extends object | string>(input: T): Result<T, "DotToDash">;
762
- /**
763
- * Converts a string, or the keys of an object/array (deeply), from dot.case to UPPER_SNAKE_CASE.
764
- *
765
- * @example
766
- * ```ts
767
- * dotToUpperSnake('hello.world'); // 'HELLO_WORLD'
768
- * dotToUpperSnake({ 'first.name': 'John' }); // { FIRST_NAME: 'John' }
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).
773
- */
774
- export declare function dotToUpperSnake<T extends object | string>(input: T): Result<T, "DotToUpperSnake">;
775
- /**
776
- * Converts a string, or the keys of an object/array (deeply), from dot.case to UPPER-DASH-CASE.
777
- *
778
- * @example
779
- * ```ts
780
- * dotToUpperDash('hello.world'); // 'HELLO-WORLD'
781
- * dotToUpperDash({ 'first.name': 'John' }); // { 'FIRST-NAME': 'John' }
782
- * ```
783
- *
784
- * @deprecated Use `toUpperKebab` 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).
786
- */
787
- export declare function dotToUpperDash<T extends object | string>(input: T): Result<T, "DotToUpperDash">;
788
- /**
789
- * Converts a string, or the keys of an object/array (deeply), from dot.case to Train-Case.
790
- *
791
- * @example
792
- * ```ts
793
- * dotToTrain('hello.world'); // 'Hello-World'
794
- * dotToTrain({ 'first.name': 'John' }); // { 'First-Name': 'John' }
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).
799
- */
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 `toKebab` 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 `toUpperKebab` 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 `toKebab` 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 `toUpperKebab` 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">;
1065
- //#endregion
1066
- //#region src/upperDashCase/upperDashCase.d.ts
1067
- /**
1068
- * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to camelCase.
1069
- *
1070
- * @example
1071
- * ```ts
1072
- * upperDashToCamel('HELLO-WORLD'); // 'helloWorld'
1073
- * upperDashToCamel({ 'FIRST-NAME': 'John' }); // { firstName: 'John' }
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).
1078
- */
1079
- export declare function upperDashToCamel<T extends object | string>(input: T): Result<T, "UpperDashToCamel">;
1080
- /**
1081
- * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to snake_case.
1082
- *
1083
- * @example
1084
- * ```ts
1085
- * upperDashToSnake('HELLO-WORLD'); // 'hello_world'
1086
- * upperDashToSnake({ 'FIRST-NAME': 'John' }); // { first_name: 'John' }
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).
1091
- */
1092
- export declare function upperDashToSnake<T extends object | string>(input: T): Result<T, "UpperDashToSnake">;
1093
- /**
1094
- * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to dash-case.
1095
- *
1096
- * @example
1097
- * ```ts
1098
- * upperDashToDash('HELLO-WORLD'); // 'hello-world'
1099
- * upperDashToDash({ 'FIRST-NAME': 'John' }); // { 'first-name': 'John' }
1100
- * ```
1101
- *
1102
- * @deprecated Use `toKebab` 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).
1104
- */
1105
- export declare function upperDashToDash<T extends object | string>(input: T): Result<T, "UpperDashToDash">;
1106
- /**
1107
- * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to PascalCase.
1108
- *
1109
- * @example
1110
- * ```ts
1111
- * upperDashToPascal('HELLO-WORLD'); // 'HelloWorld'
1112
- * upperDashToPascal({ 'FIRST-NAME': 'John' }); // { FirstName: 'John' }
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).
1117
- */
1118
- export declare function upperDashToPascal<T extends object | string>(input: T): Result<T, "UpperDashToPascal">;
1119
- /**
1120
- * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to UPPER_SNAKE_CASE.
1121
- *
1122
- * @example
1123
- * ```ts
1124
- * upperDashToUpperSnake('HELLO-WORLD'); // 'HELLO_WORLD'
1125
- * upperDashToUpperSnake({ 'FIRST-NAME': 'John' }); // { FIRST_NAME: 'John' }
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).
1130
- */
1131
- export declare function upperDashToUpperSnake<T extends object | string>(input: T): Result<T, "UpperDashToUpperSnake">;
1132
- /**
1133
- * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to Train-Case.
1134
- *
1135
- * @example
1136
- * ```ts
1137
- * upperDashToTrain('HELLO-WORLD'); // 'Hello-World'
1138
- * upperDashToTrain({ 'FIRST-NAME': 'John' }); // { 'First-Name': 'John' }
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).
1143
- */
1144
- export declare function upperDashToTrain<T extends object | string>(input: T): Result<T, "UpperDashToTrain">;
1145
- /**
1146
- * Converts a string, or the keys of an object/array (deeply), from UPPER-DASH-CASE to dot.case.
1147
- *
1148
- * @example
1149
- * ```ts
1150
- * upperDashToDot('HELLO-WORLD'); // 'hello.world'
1151
- * upperDashToDot({ 'FIRST-NAME': 'John' }); // { 'first.name': 'John' }
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).
1156
- */
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">;
1184
- //#endregion
1185
- //#region src/upperSnakeCase/upperSnakeCase.d.ts
1186
- /**
1187
- * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to camelCase.
1188
- *
1189
- * @example
1190
- * ```ts
1191
- * upperSnakeToCamel('HELLO_WORLD'); // 'helloWorld'
1192
- * upperSnakeToCamel({ FIRST_NAME: 'John' }); // { firstName: 'John' }
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).
1197
- */
1198
- export declare function upperSnakeToCamel<T extends object | string>(input: T): Result<T, "UpperSnakeToCamel">;
1199
- /**
1200
- * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to snake_case.
1201
- *
1202
- * @example
1203
- * ```ts
1204
- * upperSnakeToSnake('HELLO_WORLD'); // 'hello_world'
1205
- * upperSnakeToSnake({ FIRST_NAME: 'John' }); // { first_name: 'John' }
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).
1210
- */
1211
- export declare function upperSnakeToSnake<T extends object | string>(input: T): Result<T, "UpperSnakeToSnake">;
1212
- /**
1213
- * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to dash-case.
1214
- *
1215
- * @example
1216
- * ```ts
1217
- * upperSnakeToDash('HELLO_WORLD'); // 'hello-world'
1218
- * upperSnakeToDash({ FIRST_NAME: 'John' }); // { 'first-name': 'John' }
1219
- * ```
1220
- *
1221
- * @deprecated Use `toKebab` 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).
1223
- */
1224
- export declare function upperSnakeToDash<T extends object | string>(input: T): Result<T, "UpperSnakeToDash">;
1225
- /**
1226
- * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to PascalCase.
1227
- *
1228
- * @example
1229
- * ```ts
1230
- * upperSnakeToPascal('HELLO_WORLD'); // 'HelloWorld'
1231
- * upperSnakeToPascal({ FIRST_NAME: 'John' }); // { FirstName: 'John' }
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).
1236
- */
1237
- export declare function upperSnakeToPascal<T extends object | string>(input: T): Result<T, "UpperSnakeToPascal">;
1238
- /**
1239
- * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to UPPER-DASH-CASE.
1240
- *
1241
- * @example
1242
- * ```ts
1243
- * upperSnakeToUpperDash('HELLO_WORLD'); // 'HELLO-WORLD'
1244
- * upperSnakeToUpperDash({ FIRST_NAME: 'John' }); // { 'FIRST-NAME': 'John' }
1245
- * ```
1246
- *
1247
- * @deprecated Use `toUpperKebab` 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).
1249
- */
1250
- export declare function upperSnakeToUpperDash<T extends object | string>(input: T): Result<T, "UpperSnakeToUpperDash">;
1251
- /**
1252
- * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to Train-Case.
1253
- *
1254
- * @example
1255
- * ```ts
1256
- * upperSnakeToTrain('HELLO_WORLD'); // 'Hello-World'
1257
- * upperSnakeToTrain({ FIRST_NAME: 'John' }); // { 'First-Name': 'John' }
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).
1262
- */
1263
- export declare function upperSnakeToTrain<T extends object | string>(input: T): Result<T, "UpperSnakeToTrain">;
1264
- /**
1265
- * Converts a string, or the keys of an object/array (deeply), from UPPER_SNAKE_CASE to dot.case.
1266
- *
1267
- * @example
1268
- * ```ts
1269
- * upperSnakeToDot('HELLO_WORLD'); // 'hello.world'
1270
- * upperSnakeToDot({ FIRST_NAME: 'John' }); // { 'first.name': 'John' }
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).
1275
- */
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
1
  //#region src/anyCase/types.d.ts
2
+ /** Flattens an intersection/mapped type so editors show the resulting keys. */
3
+ type Prettify<T> = { [K in keyof T]: T[K]; } & {};
1305
4
  type Separator = "_" | "-" | "." | " ";
1306
5
  /** ASCII punctuation, except the separators `_`, `-` and `.`. */
1307
6
  type SymbolChar = "!" | "\"" | "#" | "$" | "%" | "&" | "'" | "(" | ")" | "*" | "+" | "," | "/" | ":" | ";" | "<" | "=" | ">" | "?" | "@" | "[" | "\\" | "]" | "^" | "`" | "{" | "|" | "}" | "~";
@@ -1310,26 +9,24 @@ type SymbolChar = "!" | "\"" | "#" | "$" | "%" | "&" | "'" | "(" | ")" | "*" | "
1310
9
  * removes all of them, and an array keeps only the listed ones (e.g. `['$', '@']`).
1311
10
  */
1312
11
  type AllowSymbols = boolean | readonly string[];
1313
- /**
1314
- * @deprecated Renamed to `AllowSymbols`. It will be removed in the next major version.
1315
- */
1316
- type KeepSymbols = AllowSymbols;
1317
12
  /** Changes the case of the whole result: `'lowercase'` or `'uppercase'`. */
1318
13
  type Transform = "uppercase" | "lowercase";
1319
- /** The options of the `toX` functions. `S` is inferred from `allowSymbols`. */
1320
- interface CaseOptions<S = boolean | string> {
14
+ /** The options of the `toX` functions. `S` is inferred from `allowSymbols`, and `I` from `ignore`. */
15
+ interface CaseOptions<S = boolean | string, I extends string = string> {
1321
16
  /** Symbols are removed by default. `true` keeps all of them, and an array keeps only the listed ones (e.g. `['$']`). */
1322
17
  allowSymbols?: S | readonly S[];
18
+ /** Object keys that are kept as they are, at any depth (e.g. `['_id']`). Their values are still converted. */
19
+ ignore?: readonly I[];
1323
20
  }
1324
21
  /** The options of `toDot` and `toPath`, which also take a `transform`. `X` is inferred from `transform`. */
1325
- interface TransformCaseOptions<S = boolean | string, X extends Transform | undefined = Transform | undefined> extends CaseOptions<S> {
22
+ interface TransformCaseOptions<S = boolean | string, X extends Transform | undefined = Transform | undefined, I extends string = string> extends CaseOptions<S, I> {
1326
23
  /** The original case of each word is kept by default. `'lowercase'` or `'uppercase'` changes the case of the whole result. */
1327
24
  transform?: X;
1328
25
  }
1329
26
  /** The separator that `toPath` joins the words with: `'/'` (the default) or `'\\'`. */
1330
27
  type PathSeparator = "/" | "\\";
1331
28
  /** The options of `toPath`, which also take a `separator`. `P` is inferred from `separator`. */
1332
- interface PathCaseOptions<S = boolean | string, X extends Transform | undefined = Transform | undefined, P extends PathSeparator = PathSeparator> extends TransformCaseOptions<S, X> {
29
+ interface PathCaseOptions<S = boolean | string, X extends Transform | undefined = Transform | undefined, P extends PathSeparator = PathSeparator, I extends string = string> extends TransformCaseOptions<S, X, I> {
1333
30
  /** Joins the words with `'/'` (the default) or `'\\'`. */
1334
31
  separator?: P;
1335
32
  }
@@ -1348,11 +45,11 @@ type RunText<Run> = Run extends string ? Run : "";
1348
45
  type Words<T extends string, S extends string, L extends boolean = true, W extends string[] = [], Word extends string = "", Prev extends string = "", Run extends string | false = false> = T extends `${infer C}${infer Rest}` ? C extends Separator | SymbolChar ? C extends Separator ? Words<Rest, S, L, Push<L, W, `${Word}${RunText<Run>}`>, "", "", false> : Words<Rest, S, L, W, Word, Prev, `${RunText<Run>}${C extends S ? C : ""}`> : Run extends string ? Words<Rest, S, L, Push<L, W, Word>, `${Run}${C}`, C, false> : IsUpper<C> extends true ? Prev extends "" ? Words<Rest, S, L, W, `${Word}${C}`, C> : IsUpper<Prev> extends false ? Words<Rest, S, L, Push<L, W, Word>, C, C> : Rest extends `${infer Next}${string}` ? IsLower<Next> extends true ? Words<Rest, S, L, Push<L, W, Word>, C, C> : Words<Rest, S, L, W, `${Word}${C}`, C> : Words<Rest, S, L, W, `${Word}${C}`, C> : Words<Rest, S, L, W, `${Word}${C}`, C> : Push<L, W, `${Word}${RunText<Run>}`>;
1349
46
  /** Uppercases the first character that is not a symbol: `'$id'` → `'$Id'`. */
1350
47
  type CapitalizeWord<W> = W extends `${infer C}${infer R}` ? C extends SymbolChar ? `${C}${CapitalizeWord<R>}` : `${Uppercase<C>}${R}` : W;
1351
- type Join<W, S extends string> = W extends [infer A] ? A & string : W extends [infer A, ...infer R] ? `${A & string}${S}${Join<R, S>}` : "";
48
+ type Join<W, S extends string> = W extends [infer A extends string] ? A : W extends [infer A extends string, ...infer R] ? `${A}${S}${Join<R, S>}` : "";
1352
49
  type CapitalizeAll<W> = { [K in keyof W]: CapitalizeWord<W[K] & string>; };
1353
50
  /** In a path, `/` and `\\` also separate words: they are replaced with a space before splitting, like `ToPath` does. */
1354
51
  type PathSeparatorsToSpace<T extends string> = T extends `${infer A}/${infer B}` ? PathSeparatorsToSpace<`${A} ${B}`> : T extends `${infer A}\\${infer B}` ? PathSeparatorsToSpace<`${A} ${B}`> : T;
1355
- type CamelWords<W> = W extends [infer F, ...infer R] ? `${F & string}${Join<CapitalizeAll<R>, "">}` : "";
52
+ type CamelWords<W> = W extends [infer F extends string, ...infer R] ? `${F}${Join<CapitalizeAll<R>, "">}` : "";
1356
53
  /** A case that the `toX` functions (e.g. `toSnake`) convert to. */
1357
54
  type Case = "Camel" | "Pascal" | "Snake" | "Kebab" | "UpperSnake" | "UpperKebab" | "Train" | "Dot" | "Title" | "Sentence" | "PascalSnake" | "Path" | "Space" | "Lower" | "Upper";
1358
55
  /** The symbols kept by an `allowSymbols` argument: `true` → all, `false` → none, `'$' | '@'` → those. */
@@ -1360,13 +57,15 @@ type KeptSymbols<S> = S extends true ? SymbolChar : S extends false ? never : S
1360
57
  /** Applies a `transform` to a converted key, or falls back to `string` when it is only known at runtime. */
1361
58
  type ApplyTransform<K extends string, X> = [X] extends [undefined] ? K : [X] extends ["lowercase"] ? Lowercase<K> : [X] extends ["uppercase"] ? Uppercase<K> : string;
1362
59
  type ConvertKey<K extends string, C extends Case, S extends string, P extends string = "/"> = string extends K ? string : C extends "Camel" ? CamelWords<Words<K, S>> : C extends "Pascal" ? Join<CapitalizeAll<Words<K, S>>, ""> : C extends "Snake" ? Join<Words<K, S>, "_"> : C extends "Kebab" ? Join<Words<K, S>, "-"> : C extends "UpperSnake" ? Uppercase<Join<Words<K, S>, "_">> : C extends "UpperKebab" ? Uppercase<Join<Words<K, S>, "-">> : C extends "Train" ? Join<CapitalizeAll<Words<K, S>>, "-"> : C extends "Dot" ? Join<Words<K, S, false>, "."> : C extends "Title" ? Join<CapitalizeAll<Words<K, S>>, " "> : C extends "Sentence" ? CapitalizeWord<Join<Words<K, S>, " ">> : C extends "PascalSnake" ? Join<CapitalizeAll<Words<K, S>>, "_"> : C extends "Path" ? Join<Words<PathSeparatorsToSpace<K>, S, false>, P> : C extends "Space" ? Join<Words<K, S, false>, " "> : C extends "Lower" ? Join<Words<K, S>, " "> : C extends "Upper" ? Uppercase<Join<Words<K, S>, " ">> : never;
60
+ /** An `ignore`d key keeps its name, and any key could be ignored when `ignore` is only known as `string[]`. */
61
+ type IgnoreKey<K, I extends string, Converted> = [I] extends [never] ? Converted : string extends I ? string : K extends I ? K : Converted;
1363
62
  /**
1364
63
  * The type returned by a `toX` function: strings stay `string`, and object keys
1365
64
  * in any case (deeply, including inside arrays) are renamed to the case `C`.
1366
65
  * `S` is the `allowSymbols` argument (`false` by default), `X` the `transform` option of `toDot` and `toPath`,
1367
- * and `P` the `separator` option of `toPath`.
66
+ * `P` the `separator` option of `toPath`, and `I` the keys in the `ignore` option.
1368
67
  */
1369
- type CaseResult<T, C extends Case, S = false, X = undefined, P extends string = "/"> = T extends string ? string : T extends Array<unknown> ? { [K in keyof T]: CaseResult<T[K], C, S, X, P>; } : T extends object ? Prettify<{ [K in keyof T as boolean extends S ? string : string extends KeptSymbols<S> ? string : ApplyTransform<ConvertKey<K & string, C, KeptSymbols<S>, P>, X>]: CaseResult<T[K], C, S, X, P>; }> : T;
68
+ type CaseResult<T, C extends Case, S = false, X = undefined, P extends string = "/", I extends string = never> = T extends string ? string : T extends Array<unknown> ? { [K in keyof T]: CaseResult<T[K], C, S, X, P, I>; } : T extends object ? Prettify<{ [K in keyof T as IgnoreKey<K, I, boolean extends S ? string : string extends KeptSymbols<S> ? string : ApplyTransform<ConvertKey<K & string, C, KeptSymbols<S>, P>, X>>]: CaseResult<T[K], C, S, X, P, I>; }> : T;
1370
69
  //#endregion
1371
70
  //#region src/anyCase/anyCase.d.ts
1372
71
  /**
@@ -1393,7 +92,7 @@ export declare function toCamel<T extends object | string, S extends boolean | s
1393
92
  *
1394
93
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1395
94
  */
1396
- export declare function toCamel<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Camel", S>;
95
+ export declare function toCamel<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Camel", S, undefined, "/", I>;
1397
96
  /**
1398
97
  * Converts a string, or the keys of an object/array (deeply), from any case to PascalCase.
1399
98
  *
@@ -1418,7 +117,7 @@ export declare function toPascal<T extends object | string, S extends boolean |
1418
117
  *
1419
118
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1420
119
  */
1421
- export declare function toPascal<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Pascal", S>;
120
+ export declare function toPascal<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Pascal", S, undefined, "/", I>;
1422
121
  /**
1423
122
  * Converts a string, or the keys of an object/array (deeply), from any case to snake_case.
1424
123
  *
@@ -1443,7 +142,7 @@ export declare function toSnake<T extends object | string, S extends boolean | s
1443
142
  *
1444
143
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1445
144
  */
1446
- export declare function toSnake<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Snake", S>;
145
+ export declare function toSnake<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Snake", S, undefined, "/", I>;
1447
146
  /**
1448
147
  * Converts a string, or the keys of an object/array (deeply), from any case to kebab-case.
1449
148
  *
@@ -1468,7 +167,7 @@ export declare function toKebab<T extends object | string, S extends boolean | s
1468
167
  *
1469
168
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1470
169
  */
1471
- export declare function toKebab<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Kebab", S>;
170
+ export declare function toKebab<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Kebab", S, undefined, "/", I>;
1472
171
  /**
1473
172
  * Converts a string, or the keys of an object/array (deeply), from any case to UPPER_SNAKE_CASE.
1474
173
  *
@@ -1493,7 +192,7 @@ export declare function toUpperSnake<T extends object | string, S extends boolea
1493
192
  *
1494
193
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1495
194
  */
1496
- export declare function toUpperSnake<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "UpperSnake", S>;
195
+ export declare function toUpperSnake<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "UpperSnake", S, undefined, "/", I>;
1497
196
  /**
1498
197
  * Converts a string, or the keys of an object/array (deeply), from any case to UPPER-KEBAB-CASE.
1499
198
  *
@@ -1518,7 +217,7 @@ export declare function toUpperKebab<T extends object | string, S extends boolea
1518
217
  *
1519
218
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1520
219
  */
1521
- export declare function toUpperKebab<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "UpperKebab", S>;
220
+ export declare function toUpperKebab<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "UpperKebab", S, undefined, "/", I>;
1522
221
  /**
1523
222
  * Converts a string, or the keys of an object/array (deeply), from any case to Train-Case.
1524
223
  *
@@ -1543,7 +242,7 @@ export declare function toTrain<T extends object | string, S extends boolean | s
1543
242
  *
1544
243
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1545
244
  */
1546
- export declare function toTrain<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Train", S>;
245
+ export declare function toTrain<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Train", S, undefined, "/", I>;
1547
246
  /**
1548
247
  * Converts a string, or the keys of an object/array (deeply), from any case to dot.case, keeping the original case of each word.
1549
248
  *
@@ -1557,7 +256,7 @@ export declare function toTrain<T extends object | string, S extends boolean | s
1557
256
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1558
257
  * `transform`: the original case of each word is kept by default; `'lowercase'` or `'uppercase'` changes the case of the whole result.
1559
258
  */
1560
- export declare function toDot<T extends object | string, S extends boolean | string = false, X extends Transform | undefined = undefined>(input: T, options: TransformCaseOptions<S, X>): CaseResult<T, "Dot", S, X>;
259
+ export declare function toDot<T extends object | string, S extends boolean | string = false, X extends Transform | undefined = undefined, I extends string = never>(input: T, options: TransformCaseOptions<S, X, I>): CaseResult<T, "Dot", S, X, "/", I>;
1561
260
  /**
1562
261
  * Converts a string, or the keys of an object/array (deeply), from any case to dot.case, keeping the original case of each word.
1563
262
  *
@@ -1596,7 +295,7 @@ export declare function toTitle<T extends object | string, S extends boolean | s
1596
295
  *
1597
296
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1598
297
  */
1599
- export declare function toTitle<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Title", S>;
298
+ export declare function toTitle<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Title", S, undefined, "/", I>;
1600
299
  /**
1601
300
  * Converts a string, or the keys of an object/array (deeply), from any case to Sentence case.
1602
301
  *
@@ -1621,7 +320,7 @@ export declare function toSentence<T extends object | string, S extends boolean
1621
320
  *
1622
321
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1623
322
  */
1624
- export declare function toSentence<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Sentence", S>;
323
+ export declare function toSentence<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Sentence", S, undefined, "/", I>;
1625
324
  /**
1626
325
  * Converts a string, or the keys of an object/array (deeply), from any case to Pascal_Snake_Case (also known as Ada_Case).
1627
326
  *
@@ -1646,7 +345,7 @@ export declare function toPascalSnake<T extends object | string, S extends boole
1646
345
  *
1647
346
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1648
347
  */
1649
- export declare function toPascalSnake<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "PascalSnake", S>;
348
+ export declare function toPascalSnake<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "PascalSnake", S, undefined, "/", I>;
1650
349
  /**
1651
350
  * Converts a string, or the keys of an object/array (deeply), from any case to path/case, keeping the original case of each word.
1652
351
  * `/` and `\\` in the input also separate words.
@@ -1663,7 +362,7 @@ export declare function toPascalSnake<T extends object | string, S extends boole
1663
362
  * `transform`: the original case of each word is kept by default; `'lowercase'` or `'uppercase'` changes the case of the whole result.
1664
363
  * `separator`: `'/'` (the default) or `'\\'`.
1665
364
  */
1666
- export declare function toPath<T extends object | string, S extends boolean | string = false, X extends Transform | undefined = undefined, P extends PathSeparator = "/">(input: T, options: PathCaseOptions<S, X, P>): CaseResult<T, "Path", S, X, P>;
365
+ export declare function toPath<T extends object | string, S extends boolean | string = false, X extends Transform | undefined = undefined, P extends PathSeparator = "/", I extends string = never>(input: T, options: PathCaseOptions<S, X, P, I>): CaseResult<T, "Path", S, X, P, I>;
1667
366
  /**
1668
367
  * Converts a string, or the keys of an object/array (deeply), from any case to path/case, keeping the original case of each word.
1669
368
  * `/` and `\\` in the input also separate words.
@@ -1703,7 +402,7 @@ export declare function toSpace<T extends object | string, S extends boolean | s
1703
402
  *
1704
403
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1705
404
  */
1706
- export declare function toSpace<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Space", S>;
405
+ export declare function toSpace<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Space", S, undefined, "/", I>;
1707
406
  /**
1708
407
  * Converts a string, or the keys of an object/array (deeply), from any case to lower case (space separated).
1709
408
  *
@@ -1728,7 +427,7 @@ export declare function toLower<T extends object | string, S extends boolean | s
1728
427
  *
1729
428
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1730
429
  */
1731
- export declare function toLower<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Lower", S>;
430
+ export declare function toLower<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Lower", S, undefined, "/", I>;
1732
431
  /**
1733
432
  * Converts a string, or the keys of an object/array (deeply), from any case to UPPER CASE (space separated).
1734
433
  *
@@ -1753,6 +452,6 @@ export declare function toUpper<T extends object | string, S extends boolean | s
1753
452
  *
1754
453
  * @param options `allowSymbols`: symbols are removed by default; `true` keeps all of them, and an array keeps only some.
1755
454
  */
1756
- export declare function toUpper<T extends object | string, S extends boolean | string = false>(input: T, options: CaseOptions<S>): CaseResult<T, "Upper", S>;
455
+ export declare function toUpper<T extends object | string, S extends boolean | string = false, I extends string = never>(input: T, options: CaseOptions<S, I>): CaseResult<T, "Upper", S, undefined, "/", I>;
1757
456
  //#endregion
1758
- export type { AllowSymbols, Case, CaseOptions, CaseResult, KeepSymbols, ParserType, PathCaseOptions, PathSeparator, Prettify, Result, Transform, TransformCaseOptions };
457
+ export type { AllowSymbols, Case, CaseOptions, CaseResult, PathCaseOptions, PathSeparator, Transform, TransformCaseOptions };