caseparser 4.2.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -120,6 +120,9 @@ type Result<T, P> = T extends string ? string : T extends Array<unknown> ? { [K
120
120
  * camelToDash('helloWorld'); // 'hello-world'
121
121
  * camelToDash({ firstName: 'John' }); // { 'first-name': 'John' }
122
122
  * ```
123
+ *
124
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
125
+ * so results differ for keys like `userID` (see the migration notes in the README).
123
126
  */
124
127
  export declare function camelToDash<T extends object | string>(input: T): Result<T, "CamelToDash">;
125
128
  /**
@@ -130,6 +133,9 @@ export declare function camelToDash<T extends object | string>(input: T): Result
130
133
  * camelToSnake('helloWorld'); // 'hello_world'
131
134
  * camelToSnake({ firstName: 'John' }); // { first_name: 'John' }
132
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).
133
139
  */
134
140
  export declare function camelToSnake<T extends object | string>(input: T): Result<T, "CamelToSnake">;
135
141
  /**
@@ -140,6 +146,9 @@ export declare function camelToSnake<T extends object | string>(input: T): Resul
140
146
  * camelToPascal('helloWorld'); // 'HelloWorld'
141
147
  * camelToPascal({ firstName: 'John' }); // { FirstName: 'John' }
142
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).
143
152
  */
144
153
  export declare function camelToPascal<T extends object | string>(input: T): Result<T, "CamelToPascal">;
145
154
  /**
@@ -150,6 +159,9 @@ export declare function camelToPascal<T extends object | string>(input: T): Resu
150
159
  * camelToUpperSnake('helloWorld'); // 'HELLO_WORLD'
151
160
  * camelToUpperSnake({ firstName: 'John' }); // { FIRST_NAME: 'John' }
152
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).
153
165
  */
154
166
  export declare function camelToUpperSnake<T extends object | string>(input: T): Result<T, "CamelToUpperSnake">;
155
167
  /**
@@ -160,6 +172,9 @@ export declare function camelToUpperSnake<T extends object | string>(input: T):
160
172
  * camelToUpperDash('helloWorld'); // 'HELLO-WORLD'
161
173
  * camelToUpperDash({ firstName: 'John' }); // { 'FIRST-NAME': 'John' }
162
174
  * ```
175
+ *
176
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
177
+ * so results differ for keys like `userID` (see the migration notes in the README).
163
178
  */
164
179
  export declare function camelToUpperDash<T extends object | string>(input: T): Result<T, "CamelToUpperDash">;
165
180
  /**
@@ -170,6 +185,9 @@ export declare function camelToUpperDash<T extends object | string>(input: T): R
170
185
  * camelToTrain('helloWorld'); // 'Hello-World'
171
186
  * camelToTrain({ firstName: 'John' }); // { 'First-Name': 'John' }
172
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).
173
191
  */
174
192
  export declare function camelToTrain<T extends object | string>(input: T): Result<T, "CamelToTrain">;
175
193
  /**
@@ -180,6 +198,9 @@ export declare function camelToTrain<T extends object | string>(input: T): Resul
180
198
  * camelToDot('helloWorld'); // 'hello.world'
181
199
  * camelToDot({ firstName: 'John' }); // { 'first.name': 'John' }
182
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).
183
204
  */
184
205
  export declare function camelToDot<T extends object | string>(input: T): Result<T, "CamelToDot">;
185
206
  /**
@@ -190,6 +211,9 @@ export declare function camelToDot<T extends object | string>(input: T): Result<
190
211
  * camelToTitle('helloWorld'); // 'Hello World'
191
212
  * camelToTitle({ firstName: 'John' }); // { 'First Name': 'John' }
192
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).
193
217
  */
194
218
  export declare function camelToTitle<T extends object | string>(input: T): Result<T, "CamelToTitle">;
195
219
  /**
@@ -200,6 +224,9 @@ export declare function camelToTitle<T extends object | string>(input: T): Resul
200
224
  * camelToSentence('helloWorld'); // 'Hello world'
201
225
  * camelToSentence({ firstName: 'John' }); // { 'First name': 'John' }
202
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).
203
230
  */
204
231
  export declare function camelToSentence<T extends object | string>(input: T): Result<T, "CamelToSentence">;
205
232
  //#endregion
@@ -212,6 +239,9 @@ export declare function camelToSentence<T extends object | string>(input: T): Re
212
239
  * dashToSnake('hello-world'); // 'hello_world'
213
240
  * dashToSnake({ 'first-name': 'John' }); // { first_name: 'John' }
214
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).
215
245
  */
216
246
  export declare function dashToSnake<T extends object | string>(input: T): Result<T, "DashToSnake">;
217
247
  /**
@@ -222,6 +252,9 @@ export declare function dashToSnake<T extends object | string>(input: T): Result
222
252
  * dashToCamel('hello-world'); // 'helloWorld'
223
253
  * dashToCamel({ 'first-name': 'John' }); // { firstName: 'John' }
224
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).
225
258
  */
226
259
  export declare function dashToCamel<T extends object | string>(input: T): Result<T, "DashToCamel">;
227
260
  /**
@@ -232,6 +265,9 @@ export declare function dashToCamel<T extends object | string>(input: T): Result
232
265
  * dashToPascal('hello-world'); // 'HelloWorld'
233
266
  * dashToPascal({ 'first-name': 'John' }); // { FirstName: 'John' }
234
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).
235
271
  */
236
272
  export declare function dashToPascal<T extends object | string>(input: T): Result<T, "DashToPascal">;
237
273
  /**
@@ -242,6 +278,9 @@ export declare function dashToPascal<T extends object | string>(input: T): Resul
242
278
  * dashToUpperSnake('hello-world'); // 'HELLO_WORLD'
243
279
  * dashToUpperSnake({ 'first-name': 'John' }); // { FIRST_NAME: 'John' }
244
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).
245
284
  */
246
285
  export declare function dashToUpperSnake<T extends object | string>(input: T): Result<T, "DashToUpperSnake">;
247
286
  /**
@@ -252,6 +291,9 @@ export declare function dashToUpperSnake<T extends object | string>(input: T): R
252
291
  * dashToUpperDash('hello-world'); // 'HELLO-WORLD'
253
292
  * dashToUpperDash({ 'first-name': 'John' }); // { 'FIRST-NAME': 'John' }
254
293
  * ```
294
+ *
295
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
296
+ * so results differ for keys like `userID` (see the migration notes in the README).
255
297
  */
256
298
  export declare function dashToUpperDash<T extends object | string>(input: T): Result<T, "DashToUpperDash">;
257
299
  /**
@@ -262,6 +304,9 @@ export declare function dashToUpperDash<T extends object | string>(input: T): Re
262
304
  * dashToTrain('hello-world'); // 'Hello-World'
263
305
  * dashToTrain({ 'first-name': 'John' }); // { 'First-Name': 'John' }
264
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).
265
310
  */
266
311
  export declare function dashToTrain<T extends object | string>(input: T): Result<T, "DashToTrain">;
267
312
  /**
@@ -272,6 +317,9 @@ export declare function dashToTrain<T extends object | string>(input: T): Result
272
317
  * dashToDot('hello-world'); // 'hello.world'
273
318
  * dashToDot({ 'first-name': 'John' }); // { 'first.name': 'John' }
274
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).
275
323
  */
276
324
  export declare function dashToDot<T extends object | string>(input: T): Result<T, "DashToDot">;
277
325
  /**
@@ -282,6 +330,9 @@ export declare function dashToDot<T extends object | string>(input: T): Result<T
282
330
  * dashToTitle('hello-world'); // 'Hello World'
283
331
  * dashToTitle({ 'first-name': 'John' }); // { 'First Name': 'John' }
284
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).
285
336
  */
286
337
  export declare function dashToTitle<T extends object | string>(input: T): Result<T, "DashToTitle">;
287
338
  /**
@@ -292,6 +343,9 @@ export declare function dashToTitle<T extends object | string>(input: T): Result
292
343
  * dashToSentence('hello-world'); // 'Hello world'
293
344
  * dashToSentence({ 'first-name': 'John' }); // { 'First name': 'John' }
294
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).
295
349
  */
296
350
  export declare function dashToSentence<T extends object | string>(input: T): Result<T, "DashToSentence">;
297
351
  //#endregion
@@ -304,6 +358,9 @@ export declare function dashToSentence<T extends object | string>(input: T): Res
304
358
  * pascalToCamel('HelloWorld'); // 'helloWorld'
305
359
  * pascalToCamel({ FirstName: 'John' }); // { firstName: 'John' }
306
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).
307
364
  */
308
365
  export declare function pascalToCamel<T extends object | string>(input: T): Result<T, "PascalToCamel">;
309
366
  /**
@@ -314,6 +371,9 @@ export declare function pascalToCamel<T extends object | string>(input: T): Resu
314
371
  * pascalToSnake('HelloWorld'); // 'hello_world'
315
372
  * pascalToSnake({ FirstName: 'John' }); // { first_name: 'John' }
316
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).
317
377
  */
318
378
  export declare function pascalToSnake<T extends object | string>(input: T): Result<T, "PascalToSnake">;
319
379
  /**
@@ -324,6 +384,9 @@ export declare function pascalToSnake<T extends object | string>(input: T): Resu
324
384
  * pascalToDash('HelloWorld'); // 'hello-world'
325
385
  * pascalToDash({ FirstName: 'John' }); // { 'first-name': 'John' }
326
386
  * ```
387
+ *
388
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
389
+ * so results differ for keys like `userID` (see the migration notes in the README).
327
390
  */
328
391
  export declare function pascalToDash<T extends object | string>(input: T): Result<T, "PascalToDash">;
329
392
  /**
@@ -334,6 +397,9 @@ export declare function pascalToDash<T extends object | string>(input: T): Resul
334
397
  * pascalToUpperSnake('HelloWorld'); // 'HELLO_WORLD'
335
398
  * pascalToUpperSnake({ FirstName: 'John' }); // { FIRST_NAME: 'John' }
336
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).
337
403
  */
338
404
  export declare function pascalToUpperSnake<T extends object | string>(input: T): Result<T, "PascalToUpperSnake">;
339
405
  /**
@@ -344,6 +410,9 @@ export declare function pascalToUpperSnake<T extends object | string>(input: T):
344
410
  * pascalToUpperDash('HelloWorld'); // 'HELLO-WORLD'
345
411
  * pascalToUpperDash({ FirstName: 'John' }); // { 'FIRST-NAME': 'John' }
346
412
  * ```
413
+ *
414
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
415
+ * so results differ for keys like `userID` (see the migration notes in the README).
347
416
  */
348
417
  export declare function pascalToUpperDash<T extends object | string>(input: T): Result<T, "PascalToUpperDash">;
349
418
  /**
@@ -354,6 +423,9 @@ export declare function pascalToUpperDash<T extends object | string>(input: T):
354
423
  * pascalToTrain('HelloWorld'); // 'Hello-World'
355
424
  * pascalToTrain({ FirstName: 'John' }); // { 'First-Name': 'John' }
356
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).
357
429
  */
358
430
  export declare function pascalToTrain<T extends object | string>(input: T): Result<T, "PascalToTrain">;
359
431
  /**
@@ -364,6 +436,9 @@ export declare function pascalToTrain<T extends object | string>(input: T): Resu
364
436
  * pascalToDot('HelloWorld'); // 'hello.world'
365
437
  * pascalToDot({ FirstName: 'John' }); // { 'first.name': 'John' }
366
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).
367
442
  */
368
443
  export declare function pascalToDot<T extends object | string>(input: T): Result<T, "PascalToDot">;
369
444
  /**
@@ -374,6 +449,9 @@ export declare function pascalToDot<T extends object | string>(input: T): Result
374
449
  * pascalToTitle('HelloWorld'); // 'Hello World'
375
450
  * pascalToTitle({ FirstName: 'John' }); // { 'First Name': 'John' }
376
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).
377
455
  */
378
456
  export declare function pascalToTitle<T extends object | string>(input: T): Result<T, "PascalToTitle">;
379
457
  /**
@@ -384,6 +462,9 @@ export declare function pascalToTitle<T extends object | string>(input: T): Resu
384
462
  * pascalToSentence('HelloWorld'); // 'Hello world'
385
463
  * pascalToSentence({ FirstName: 'John' }); // { 'First name': 'John' }
386
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).
387
468
  */
388
469
  export declare function pascalToSentence<T extends object | string>(input: T): Result<T, "PascalToSentence">;
389
470
  //#endregion
@@ -396,6 +477,9 @@ export declare function pascalToSentence<T extends object | string>(input: T): R
396
477
  * snakeToCamel('hello_world'); // 'helloWorld'
397
478
  * snakeToCamel({ first_name: 'John' }); // { firstName: 'John' }
398
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).
399
483
  */
400
484
  export declare function snakeToCamel<T extends object | string>(input: T): Result<T, "SnakeToCamel">;
401
485
  /**
@@ -406,6 +490,9 @@ export declare function snakeToCamel<T extends object | string>(input: T): Resul
406
490
  * snakeToDash('hello_world'); // 'hello-world'
407
491
  * snakeToDash({ first_name: 'John' }); // { 'first-name': 'John' }
408
492
  * ```
493
+ *
494
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
495
+ * so results differ for keys like `userID` (see the migration notes in the README).
409
496
  */
410
497
  export declare function snakeToDash<T extends object | string>(input: T): Result<T, "SnakeToDash">;
411
498
  /**
@@ -416,6 +503,9 @@ export declare function snakeToDash<T extends object | string>(input: T): Result
416
503
  * snakeToPascal('hello_world'); // 'HelloWorld'
417
504
  * snakeToPascal({ first_name: 'John' }); // { FirstName: 'John' }
418
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).
419
509
  */
420
510
  export declare function snakeToPascal<T extends object | string>(input: T): Result<T, "SnakeToPascal">;
421
511
  /**
@@ -426,6 +516,9 @@ export declare function snakeToPascal<T extends object | string>(input: T): Resu
426
516
  * snakeToUpperSnake('hello_world'); // 'HELLO_WORLD'
427
517
  * snakeToUpperSnake({ first_name: 'John' }); // { FIRST_NAME: 'John' }
428
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).
429
522
  */
430
523
  export declare function snakeToUpperSnake<T extends object | string>(input: T): Result<T, "SnakeToUpperSnake">;
431
524
  /**
@@ -436,6 +529,9 @@ export declare function snakeToUpperSnake<T extends object | string>(input: T):
436
529
  * snakeToUpperDash('hello_world'); // 'HELLO-WORLD'
437
530
  * snakeToUpperDash({ first_name: 'John' }); // { 'FIRST-NAME': 'John' }
438
531
  * ```
532
+ *
533
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
534
+ * so results differ for keys like `userID` (see the migration notes in the README).
439
535
  */
440
536
  export declare function snakeToUpperDash<T extends object | string>(input: T): Result<T, "SnakeToUpperDash">;
441
537
  /**
@@ -446,6 +542,9 @@ export declare function snakeToUpperDash<T extends object | string>(input: T): R
446
542
  * snakeToTrain('hello_world'); // 'Hello-World'
447
543
  * snakeToTrain({ first_name: 'John' }); // { 'First-Name': 'John' }
448
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).
449
548
  */
450
549
  export declare function snakeToTrain<T extends object | string>(input: T): Result<T, "SnakeToTrain">;
451
550
  /**
@@ -456,6 +555,9 @@ export declare function snakeToTrain<T extends object | string>(input: T): Resul
456
555
  * snakeToDot('hello_world'); // 'hello.world'
457
556
  * snakeToDot({ first_name: 'John' }); // { 'first.name': 'John' }
458
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).
459
561
  */
460
562
  export declare function snakeToDot<T extends object | string>(input: T): Result<T, "SnakeToDot">;
461
563
  /**
@@ -466,6 +568,9 @@ export declare function snakeToDot<T extends object | string>(input: T): Result<
466
568
  * snakeToTitle('hello_world'); // 'Hello World'
467
569
  * snakeToTitle({ first_name: 'John' }); // { 'First Name': 'John' }
468
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).
469
574
  */
470
575
  export declare function snakeToTitle<T extends object | string>(input: T): Result<T, "SnakeToTitle">;
471
576
  /**
@@ -476,6 +581,9 @@ export declare function snakeToTitle<T extends object | string>(input: T): Resul
476
581
  * snakeToSentence('hello_world'); // 'Hello world'
477
582
  * snakeToSentence({ first_name: 'John' }); // { 'First name': 'John' }
478
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).
479
587
  */
480
588
  export declare function snakeToSentence<T extends object | string>(input: T): Result<T, "SnakeToSentence">;
481
589
  //#endregion
@@ -488,6 +596,9 @@ export declare function snakeToSentence<T extends object | string>(input: T): Re
488
596
  * trainToCamel('Hello-World'); // 'helloWorld'
489
597
  * trainToCamel({ 'First-Name': 'John' }); // { firstName: 'John' }
490
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).
491
602
  */
492
603
  export declare function trainToCamel<T extends object | string>(input: T): Result<T, "TrainToCamel">;
493
604
  /**
@@ -498,6 +609,9 @@ export declare function trainToCamel<T extends object | string>(input: T): Resul
498
609
  * trainToPascal('Hello-World'); // 'HelloWorld'
499
610
  * trainToPascal({ 'First-Name': 'John' }); // { FirstName: 'John' }
500
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).
501
615
  */
502
616
  export declare function trainToPascal<T extends object | string>(input: T): Result<T, "TrainToPascal">;
503
617
  /**
@@ -508,6 +622,9 @@ export declare function trainToPascal<T extends object | string>(input: T): Resu
508
622
  * trainToSnake('Hello-World'); // 'hello_world'
509
623
  * trainToSnake({ 'First-Name': 'John' }); // { first_name: 'John' }
510
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).
511
628
  */
512
629
  export declare function trainToSnake<T extends object | string>(input: T): Result<T, "TrainToSnake">;
513
630
  /**
@@ -518,6 +635,9 @@ export declare function trainToSnake<T extends object | string>(input: T): Resul
518
635
  * trainToDash('Hello-World'); // 'hello-world'
519
636
  * trainToDash({ 'First-Name': 'John' }); // { 'first-name': 'John' }
520
637
  * ```
638
+ *
639
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
640
+ * so results differ for keys like `userID` (see the migration notes in the README).
521
641
  */
522
642
  export declare function trainToDash<T extends object | string>(input: T): Result<T, "TrainToDash">;
523
643
  /**
@@ -528,6 +648,9 @@ export declare function trainToDash<T extends object | string>(input: T): Result
528
648
  * trainToUpperSnake('Hello-World'); // 'HELLO_WORLD'
529
649
  * trainToUpperSnake({ 'First-Name': 'John' }); // { FIRST_NAME: 'John' }
530
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).
531
654
  */
532
655
  export declare function trainToUpperSnake<T extends object | string>(input: T): Result<T, "TrainToUpperSnake">;
533
656
  /**
@@ -538,6 +661,9 @@ export declare function trainToUpperSnake<T extends object | string>(input: T):
538
661
  * trainToUpperDash('Hello-World'); // 'HELLO-WORLD'
539
662
  * trainToUpperDash({ 'First-Name': 'John' }); // { 'FIRST-NAME': 'John' }
540
663
  * ```
664
+ *
665
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
666
+ * so results differ for keys like `userID` (see the migration notes in the README).
541
667
  */
542
668
  export declare function trainToUpperDash<T extends object | string>(input: T): Result<T, "TrainToUpperDash">;
543
669
  /**
@@ -548,6 +674,9 @@ export declare function trainToUpperDash<T extends object | string>(input: T): R
548
674
  * trainToDot('Hello-World'); // 'hello.world'
549
675
  * trainToDot({ 'First-Name': 'John' }); // { 'first.name': 'John' }
550
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).
551
680
  */
552
681
  export declare function trainToDot<T extends object | string>(input: T): Result<T, "TrainToDot">;
553
682
  /**
@@ -558,6 +687,9 @@ export declare function trainToDot<T extends object | string>(input: T): Result<
558
687
  * trainToTitle('Hello-World'); // 'Hello World'
559
688
  * trainToTitle({ 'First-Name': 'John' }); // { 'First Name': 'John' }
560
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).
561
693
  */
562
694
  export declare function trainToTitle<T extends object | string>(input: T): Result<T, "TrainToTitle">;
563
695
  /**
@@ -568,6 +700,9 @@ export declare function trainToTitle<T extends object | string>(input: T): Resul
568
700
  * trainToSentence('Hello-World'); // 'Hello world'
569
701
  * trainToSentence({ 'First-Name': 'John' }); // { 'First name': 'John' }
570
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).
571
706
  */
572
707
  export declare function trainToSentence<T extends object | string>(input: T): Result<T, "TrainToSentence">;
573
708
  //#endregion
@@ -580,6 +715,9 @@ export declare function trainToSentence<T extends object | string>(input: T): Re
580
715
  * dotToCamel('hello.world'); // 'helloWorld'
581
716
  * dotToCamel({ 'first.name': 'John' }); // { firstName: 'John' }
582
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).
583
721
  */
584
722
  export declare function dotToCamel<T extends object | string>(input: T): Result<T, "DotToCamel">;
585
723
  /**
@@ -590,6 +728,9 @@ export declare function dotToCamel<T extends object | string>(input: T): Result<
590
728
  * dotToPascal('hello.world'); // 'HelloWorld'
591
729
  * dotToPascal({ 'first.name': 'John' }); // { FirstName: 'John' }
592
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).
593
734
  */
594
735
  export declare function dotToPascal<T extends object | string>(input: T): Result<T, "DotToPascal">;
595
736
  /**
@@ -600,6 +741,9 @@ export declare function dotToPascal<T extends object | string>(input: T): Result
600
741
  * dotToSnake('hello.world'); // 'hello_world'
601
742
  * dotToSnake({ 'first.name': 'John' }); // { first_name: 'John' }
602
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).
603
747
  */
604
748
  export declare function dotToSnake<T extends object | string>(input: T): Result<T, "DotToSnake">;
605
749
  /**
@@ -610,6 +754,9 @@ export declare function dotToSnake<T extends object | string>(input: T): Result<
610
754
  * dotToDash('hello.world'); // 'hello-world'
611
755
  * dotToDash({ 'first.name': 'John' }); // { 'first-name': 'John' }
612
756
  * ```
757
+ *
758
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
759
+ * so results differ for keys like `userID` (see the migration notes in the README).
613
760
  */
614
761
  export declare function dotToDash<T extends object | string>(input: T): Result<T, "DotToDash">;
615
762
  /**
@@ -620,6 +767,9 @@ export declare function dotToDash<T extends object | string>(input: T): Result<T
620
767
  * dotToUpperSnake('hello.world'); // 'HELLO_WORLD'
621
768
  * dotToUpperSnake({ 'first.name': 'John' }); // { FIRST_NAME: 'John' }
622
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).
623
773
  */
624
774
  export declare function dotToUpperSnake<T extends object | string>(input: T): Result<T, "DotToUpperSnake">;
625
775
  /**
@@ -630,6 +780,9 @@ export declare function dotToUpperSnake<T extends object | string>(input: T): Re
630
780
  * dotToUpperDash('hello.world'); // 'HELLO-WORLD'
631
781
  * dotToUpperDash({ 'first.name': 'John' }); // { 'FIRST-NAME': 'John' }
632
782
  * ```
783
+ *
784
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
785
+ * so results differ for keys like `userID` (see the migration notes in the README).
633
786
  */
634
787
  export declare function dotToUpperDash<T extends object | string>(input: T): Result<T, "DotToUpperDash">;
635
788
  /**
@@ -640,6 +793,9 @@ export declare function dotToUpperDash<T extends object | string>(input: T): Res
640
793
  * dotToTrain('hello.world'); // 'Hello-World'
641
794
  * dotToTrain({ 'first.name': 'John' }); // { 'First-Name': 'John' }
642
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).
643
799
  */
644
800
  export declare function dotToTrain<T extends object | string>(input: T): Result<T, "DotToTrain">;
645
801
  /**
@@ -650,6 +806,9 @@ export declare function dotToTrain<T extends object | string>(input: T): Result<
650
806
  * dotToTitle('hello.world'); // 'Hello World'
651
807
  * dotToTitle({ 'first.name': 'John' }); // { 'First Name': 'John' }
652
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).
653
812
  */
654
813
  export declare function dotToTitle<T extends object | string>(input: T): Result<T, "DotToTitle">;
655
814
  /**
@@ -660,6 +819,9 @@ export declare function dotToTitle<T extends object | string>(input: T): Result<
660
819
  * dotToSentence('hello.world'); // 'Hello world'
661
820
  * dotToSentence({ 'first.name': 'John' }); // { 'First name': 'John' }
662
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).
663
825
  */
664
826
  export declare function dotToSentence<T extends object | string>(input: T): Result<T, "DotToSentence">;
665
827
  //#endregion
@@ -672,6 +834,9 @@ export declare function dotToSentence<T extends object | string>(input: T): Resu
672
834
  * titleToCamel('Hello World'); // 'helloWorld'
673
835
  * titleToCamel({ 'First Name': 'John' }); // { firstName: 'John' }
674
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).
675
840
  */
676
841
  export declare function titleToCamel<T extends object | string>(input: T): Result<T, "TitleToCamel">;
677
842
  /**
@@ -682,6 +847,9 @@ export declare function titleToCamel<T extends object | string>(input: T): Resul
682
847
  * titleToPascal('Hello World'); // 'HelloWorld'
683
848
  * titleToPascal({ 'First Name': 'John' }); // { FirstName: 'John' }
684
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).
685
853
  */
686
854
  export declare function titleToPascal<T extends object | string>(input: T): Result<T, "TitleToPascal">;
687
855
  /**
@@ -692,6 +860,9 @@ export declare function titleToPascal<T extends object | string>(input: T): Resu
692
860
  * titleToSnake('Hello World'); // 'hello_world'
693
861
  * titleToSnake({ 'First Name': 'John' }); // { first_name: 'John' }
694
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).
695
866
  */
696
867
  export declare function titleToSnake<T extends object | string>(input: T): Result<T, "TitleToSnake">;
697
868
  /**
@@ -702,6 +873,9 @@ export declare function titleToSnake<T extends object | string>(input: T): Resul
702
873
  * titleToDash('Hello World'); // 'hello-world'
703
874
  * titleToDash({ 'First Name': 'John' }); // { 'first-name': 'John' }
704
875
  * ```
876
+ *
877
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
878
+ * so results differ for keys like `userID` (see the migration notes in the README).
705
879
  */
706
880
  export declare function titleToDash<T extends object | string>(input: T): Result<T, "TitleToDash">;
707
881
  /**
@@ -712,6 +886,9 @@ export declare function titleToDash<T extends object | string>(input: T): Result
712
886
  * titleToUpperSnake('Hello World'); // 'HELLO_WORLD'
713
887
  * titleToUpperSnake({ 'First Name': 'John' }); // { FIRST_NAME: 'John' }
714
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).
715
892
  */
716
893
  export declare function titleToUpperSnake<T extends object | string>(input: T): Result<T, "TitleToUpperSnake">;
717
894
  /**
@@ -722,6 +899,9 @@ export declare function titleToUpperSnake<T extends object | string>(input: T):
722
899
  * titleToUpperDash('Hello World'); // 'HELLO-WORLD'
723
900
  * titleToUpperDash({ 'First Name': 'John' }); // { 'FIRST-NAME': 'John' }
724
901
  * ```
902
+ *
903
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
904
+ * so results differ for keys like `userID` (see the migration notes in the README).
725
905
  */
726
906
  export declare function titleToUpperDash<T extends object | string>(input: T): Result<T, "TitleToUpperDash">;
727
907
  /**
@@ -732,6 +912,9 @@ export declare function titleToUpperDash<T extends object | string>(input: T): R
732
912
  * titleToTrain('Hello World'); // 'Hello-World'
733
913
  * titleToTrain({ 'First Name': 'John' }); // { 'First-Name': 'John' }
734
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).
735
918
  */
736
919
  export declare function titleToTrain<T extends object | string>(input: T): Result<T, "TitleToTrain">;
737
920
  /**
@@ -742,6 +925,9 @@ export declare function titleToTrain<T extends object | string>(input: T): Resul
742
925
  * titleToDot('Hello World'); // 'hello.world'
743
926
  * titleToDot({ 'First Name': 'John' }); // { 'first.name': 'John' }
744
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).
745
931
  */
746
932
  export declare function titleToDot<T extends object | string>(input: T): Result<T, "TitleToDot">;
747
933
  /**
@@ -752,6 +938,9 @@ export declare function titleToDot<T extends object | string>(input: T): Result<
752
938
  * titleToSentence('Hello World'); // 'Hello world'
753
939
  * titleToSentence({ 'First Name': 'John' }); // { 'First name': 'John' }
754
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).
755
944
  */
756
945
  export declare function titleToSentence<T extends object | string>(input: T): Result<T, "TitleToSentence">;
757
946
  //#endregion
@@ -764,6 +953,9 @@ export declare function titleToSentence<T extends object | string>(input: T): Re
764
953
  * sentenceToCamel('Hello world'); // 'helloWorld'
765
954
  * sentenceToCamel({ 'First name': 'John' }); // { firstName: 'John' }
766
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).
767
959
  */
768
960
  export declare function sentenceToCamel<T extends object | string>(input: T): Result<T, "SentenceToCamel">;
769
961
  /**
@@ -774,6 +966,9 @@ export declare function sentenceToCamel<T extends object | string>(input: T): Re
774
966
  * sentenceToPascal('Hello world'); // 'HelloWorld'
775
967
  * sentenceToPascal({ 'First name': 'John' }); // { FirstName: 'John' }
776
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).
777
972
  */
778
973
  export declare function sentenceToPascal<T extends object | string>(input: T): Result<T, "SentenceToPascal">;
779
974
  /**
@@ -784,6 +979,9 @@ export declare function sentenceToPascal<T extends object | string>(input: T): R
784
979
  * sentenceToSnake('Hello world'); // 'hello_world'
785
980
  * sentenceToSnake({ 'First name': 'John' }); // { first_name: 'John' }
786
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).
787
985
  */
788
986
  export declare function sentenceToSnake<T extends object | string>(input: T): Result<T, "SentenceToSnake">;
789
987
  /**
@@ -794,6 +992,9 @@ export declare function sentenceToSnake<T extends object | string>(input: T): Re
794
992
  * sentenceToDash('Hello world'); // 'hello-world'
795
993
  * sentenceToDash({ 'First name': 'John' }); // { 'first-name': 'John' }
796
994
  * ```
995
+ *
996
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
997
+ * so results differ for keys like `userID` (see the migration notes in the README).
797
998
  */
798
999
  export declare function sentenceToDash<T extends object | string>(input: T): Result<T, "SentenceToDash">;
799
1000
  /**
@@ -804,6 +1005,9 @@ export declare function sentenceToDash<T extends object | string>(input: T): Res
804
1005
  * sentenceToUpperSnake('Hello world'); // 'HELLO_WORLD'
805
1006
  * sentenceToUpperSnake({ 'First name': 'John' }); // { FIRST_NAME: 'John' }
806
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).
807
1011
  */
808
1012
  export declare function sentenceToUpperSnake<T extends object | string>(input: T): Result<T, "SentenceToUpperSnake">;
809
1013
  /**
@@ -814,6 +1018,9 @@ export declare function sentenceToUpperSnake<T extends object | string>(input: T
814
1018
  * sentenceToUpperDash('Hello world'); // 'HELLO-WORLD'
815
1019
  * sentenceToUpperDash({ 'First name': 'John' }); // { 'FIRST-NAME': 'John' }
816
1020
  * ```
1021
+ *
1022
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
1023
+ * so results differ for keys like `userID` (see the migration notes in the README).
817
1024
  */
818
1025
  export declare function sentenceToUpperDash<T extends object | string>(input: T): Result<T, "SentenceToUpperDash">;
819
1026
  /**
@@ -824,6 +1031,9 @@ export declare function sentenceToUpperDash<T extends object | string>(input: T)
824
1031
  * sentenceToTrain('Hello world'); // 'Hello-World'
825
1032
  * sentenceToTrain({ 'First name': 'John' }); // { 'First-Name': 'John' }
826
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).
827
1037
  */
828
1038
  export declare function sentenceToTrain<T extends object | string>(input: T): Result<T, "SentenceToTrain">;
829
1039
  /**
@@ -834,6 +1044,9 @@ export declare function sentenceToTrain<T extends object | string>(input: T): Re
834
1044
  * sentenceToDot('Hello world'); // 'hello.world'
835
1045
  * sentenceToDot({ 'First name': 'John' }); // { 'first.name': 'John' }
836
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).
837
1050
  */
838
1051
  export declare function sentenceToDot<T extends object | string>(input: T): Result<T, "SentenceToDot">;
839
1052
  /**
@@ -844,6 +1057,9 @@ export declare function sentenceToDot<T extends object | string>(input: T): Resu
844
1057
  * sentenceToTitle('Hello world'); // 'Hello World'
845
1058
  * sentenceToTitle({ 'First name': 'John' }); // { 'First Name': 'John' }
846
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).
847
1063
  */
848
1064
  export declare function sentenceToTitle<T extends object | string>(input: T): Result<T, "SentenceToTitle">;
849
1065
  //#endregion
@@ -856,6 +1072,9 @@ export declare function sentenceToTitle<T extends object | string>(input: T): Re
856
1072
  * upperDashToCamel('HELLO-WORLD'); // 'helloWorld'
857
1073
  * upperDashToCamel({ 'FIRST-NAME': 'John' }); // { firstName: 'John' }
858
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).
859
1078
  */
860
1079
  export declare function upperDashToCamel<T extends object | string>(input: T): Result<T, "UpperDashToCamel">;
861
1080
  /**
@@ -866,6 +1085,9 @@ export declare function upperDashToCamel<T extends object | string>(input: T): R
866
1085
  * upperDashToSnake('HELLO-WORLD'); // 'hello_world'
867
1086
  * upperDashToSnake({ 'FIRST-NAME': 'John' }); // { first_name: 'John' }
868
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).
869
1091
  */
870
1092
  export declare function upperDashToSnake<T extends object | string>(input: T): Result<T, "UpperDashToSnake">;
871
1093
  /**
@@ -876,6 +1098,9 @@ export declare function upperDashToSnake<T extends object | string>(input: T): R
876
1098
  * upperDashToDash('HELLO-WORLD'); // 'hello-world'
877
1099
  * upperDashToDash({ 'FIRST-NAME': 'John' }); // { 'first-name': 'John' }
878
1100
  * ```
1101
+ *
1102
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
1103
+ * so results differ for keys like `userID` (see the migration notes in the README).
879
1104
  */
880
1105
  export declare function upperDashToDash<T extends object | string>(input: T): Result<T, "UpperDashToDash">;
881
1106
  /**
@@ -886,6 +1111,9 @@ export declare function upperDashToDash<T extends object | string>(input: T): Re
886
1111
  * upperDashToPascal('HELLO-WORLD'); // 'HelloWorld'
887
1112
  * upperDashToPascal({ 'FIRST-NAME': 'John' }); // { FirstName: 'John' }
888
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).
889
1117
  */
890
1118
  export declare function upperDashToPascal<T extends object | string>(input: T): Result<T, "UpperDashToPascal">;
891
1119
  /**
@@ -896,6 +1124,9 @@ export declare function upperDashToPascal<T extends object | string>(input: T):
896
1124
  * upperDashToUpperSnake('HELLO-WORLD'); // 'HELLO_WORLD'
897
1125
  * upperDashToUpperSnake({ 'FIRST-NAME': 'John' }); // { FIRST_NAME: 'John' }
898
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).
899
1130
  */
900
1131
  export declare function upperDashToUpperSnake<T extends object | string>(input: T): Result<T, "UpperDashToUpperSnake">;
901
1132
  /**
@@ -906,6 +1137,9 @@ export declare function upperDashToUpperSnake<T extends object | string>(input:
906
1137
  * upperDashToTrain('HELLO-WORLD'); // 'Hello-World'
907
1138
  * upperDashToTrain({ 'FIRST-NAME': 'John' }); // { 'First-Name': 'John' }
908
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).
909
1143
  */
910
1144
  export declare function upperDashToTrain<T extends object | string>(input: T): Result<T, "UpperDashToTrain">;
911
1145
  /**
@@ -916,6 +1150,9 @@ export declare function upperDashToTrain<T extends object | string>(input: T): R
916
1150
  * upperDashToDot('HELLO-WORLD'); // 'hello.world'
917
1151
  * upperDashToDot({ 'FIRST-NAME': 'John' }); // { 'first.name': 'John' }
918
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).
919
1156
  */
920
1157
  export declare function upperDashToDot<T extends object | string>(input: T): Result<T, "UpperDashToDot">;
921
1158
  /**
@@ -926,6 +1163,9 @@ export declare function upperDashToDot<T extends object | string>(input: T): Res
926
1163
  * upperDashToTitle('HELLO-WORLD'); // 'Hello World'
927
1164
  * upperDashToTitle({ 'FIRST-NAME': 'John' }); // { 'First Name': 'John' }
928
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).
929
1169
  */
930
1170
  export declare function upperDashToTitle<T extends object | string>(input: T): Result<T, "UpperDashToTitle">;
931
1171
  /**
@@ -936,6 +1176,9 @@ export declare function upperDashToTitle<T extends object | string>(input: T): R
936
1176
  * upperDashToSentence('HELLO-WORLD'); // 'Hello world'
937
1177
  * upperDashToSentence({ 'FIRST-NAME': 'John' }); // { 'First name': 'John' }
938
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).
939
1182
  */
940
1183
  export declare function upperDashToSentence<T extends object | string>(input: T): Result<T, "UpperDashToSentence">;
941
1184
  //#endregion
@@ -948,6 +1191,9 @@ export declare function upperDashToSentence<T extends object | string>(input: T)
948
1191
  * upperSnakeToCamel('HELLO_WORLD'); // 'helloWorld'
949
1192
  * upperSnakeToCamel({ FIRST_NAME: 'John' }); // { firstName: 'John' }
950
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).
951
1197
  */
952
1198
  export declare function upperSnakeToCamel<T extends object | string>(input: T): Result<T, "UpperSnakeToCamel">;
953
1199
  /**
@@ -958,6 +1204,9 @@ export declare function upperSnakeToCamel<T extends object | string>(input: T):
958
1204
  * upperSnakeToSnake('HELLO_WORLD'); // 'hello_world'
959
1205
  * upperSnakeToSnake({ FIRST_NAME: 'John' }); // { first_name: 'John' }
960
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).
961
1210
  */
962
1211
  export declare function upperSnakeToSnake<T extends object | string>(input: T): Result<T, "UpperSnakeToSnake">;
963
1212
  /**
@@ -968,6 +1217,9 @@ export declare function upperSnakeToSnake<T extends object | string>(input: T):
968
1217
  * upperSnakeToDash('HELLO_WORLD'); // 'hello-world'
969
1218
  * upperSnakeToDash({ FIRST_NAME: 'John' }); // { 'first-name': 'John' }
970
1219
  * ```
1220
+ *
1221
+ * @deprecated Use `toDash` instead, which converts from any case. It keeps acronyms together,
1222
+ * so results differ for keys like `userID` (see the migration notes in the README).
971
1223
  */
972
1224
  export declare function upperSnakeToDash<T extends object | string>(input: T): Result<T, "UpperSnakeToDash">;
973
1225
  /**
@@ -978,6 +1230,9 @@ export declare function upperSnakeToDash<T extends object | string>(input: T): R
978
1230
  * upperSnakeToPascal('HELLO_WORLD'); // 'HelloWorld'
979
1231
  * upperSnakeToPascal({ FIRST_NAME: 'John' }); // { FirstName: 'John' }
980
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).
981
1236
  */
982
1237
  export declare function upperSnakeToPascal<T extends object | string>(input: T): Result<T, "UpperSnakeToPascal">;
983
1238
  /**
@@ -988,6 +1243,9 @@ export declare function upperSnakeToPascal<T extends object | string>(input: T):
988
1243
  * upperSnakeToUpperDash('HELLO_WORLD'); // 'HELLO-WORLD'
989
1244
  * upperSnakeToUpperDash({ FIRST_NAME: 'John' }); // { 'FIRST-NAME': 'John' }
990
1245
  * ```
1246
+ *
1247
+ * @deprecated Use `toUpperDash` instead, which converts from any case. It keeps acronyms together,
1248
+ * so results differ for keys like `userID` (see the migration notes in the README).
991
1249
  */
992
1250
  export declare function upperSnakeToUpperDash<T extends object | string>(input: T): Result<T, "UpperSnakeToUpperDash">;
993
1251
  /**
@@ -998,6 +1256,9 @@ export declare function upperSnakeToUpperDash<T extends object | string>(input:
998
1256
  * upperSnakeToTrain('HELLO_WORLD'); // 'Hello-World'
999
1257
  * upperSnakeToTrain({ FIRST_NAME: 'John' }); // { 'First-Name': 'John' }
1000
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).
1001
1262
  */
1002
1263
  export declare function upperSnakeToTrain<T extends object | string>(input: T): Result<T, "UpperSnakeToTrain">;
1003
1264
  /**
@@ -1008,6 +1269,9 @@ export declare function upperSnakeToTrain<T extends object | string>(input: T):
1008
1269
  * upperSnakeToDot('HELLO_WORLD'); // 'hello.world'
1009
1270
  * upperSnakeToDot({ FIRST_NAME: 'John' }); // { 'first.name': 'John' }
1010
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).
1011
1275
  */
1012
1276
  export declare function upperSnakeToDot<T extends object | string>(input: T): Result<T, "UpperSnakeToDot">;
1013
1277
  /**
@@ -1018,6 +1282,9 @@ export declare function upperSnakeToDot<T extends object | string>(input: T): Re
1018
1282
  * upperSnakeToTitle('HELLO_WORLD'); // 'Hello World'
1019
1283
  * upperSnakeToTitle({ FIRST_NAME: 'John' }); // { 'First Name': 'John' }
1020
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).
1021
1288
  */
1022
1289
  export declare function upperSnakeToTitle<T extends object | string>(input: T): Result<T, "UpperSnakeToTitle">;
1023
1290
  /**
@@ -1028,7 +1295,135 @@ export declare function upperSnakeToTitle<T extends object | string>(input: T):
1028
1295
  * upperSnakeToSentence('HELLO_WORLD'); // 'Hello world'
1029
1296
  * upperSnakeToSentence({ FIRST_NAME: 'John' }); // { 'First name': 'John' }
1030
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).
1031
1301
  */
1032
1302
  export declare function upperSnakeToSentence<T extends object | string>(input: T): Result<T, "UpperSnakeToSentence">;
1033
1303
  //#endregion
1034
- export type { ParserType, Prettify, Result };
1304
+ //#region src/anyCase/types.d.ts
1305
+ type Separator = "_" | "-" | "." | " ";
1306
+ type IsUpper<C extends string> = C extends Lowercase<C> ? false : true;
1307
+ type IsLower<C extends string> = C extends Uppercase<C> ? false : true;
1308
+ type Push<W extends string[], Word extends string> = Word extends "" ? W : [...W, Lowercase<Word>];
1309
+ /**
1310
+ * Splits a string into lowercase words, the same way `words()` does at runtime:
1311
+ * on `_`, `-`, `.` and spaces, before an uppercase letter that follows a lowercase
1312
+ * letter or a digit (`helloWorld`), and before the last letter of an acronym (`XMLHttp`).
1313
+ */
1314
+ type Words<T extends string, W extends string[] = [], Word extends string = "", Prev extends string = ""> = T extends `${infer C}${infer Rest}` ? C extends Separator ? Words<Rest, Push<W, Word>, "", ""> : IsUpper<C> extends true ? Word extends "" ? Words<Rest, W, C, C> : IsUpper<Prev> extends false ? Words<Rest, Push<W, Word>, C, C> : Rest extends `${infer Next}${string}` ? IsLower<Next> extends true ? Words<Rest, Push<W, Word>, C, C> : Words<Rest, W, `${Word}${C}`, C> : Words<Rest, W, `${Word}${C}`, C> : Words<Rest, W, `${Word}${C}`, C> : Push<W, Word>;
1315
+ type Join<W, S extends string> = W extends [infer A] ? A & string : W extends [infer A, ...infer R] ? `${A & string}${S}${Join<R, S>}` : "";
1316
+ type CapitalizeAll<W> = { [K in keyof W]: Capitalize<W[K] & string>; };
1317
+ type CamelWords<W> = W extends [infer F, ...infer R] ? `${F & string}${Join<CapitalizeAll<R>, "">}` : "";
1318
+ /** A case that the `toX` functions (e.g. `toSnake`) convert to. */
1319
+ type Case = "Camel" | "Pascal" | "Snake" | "Dash" | "UpperSnake" | "UpperDash" | "Train" | "Dot" | "Title" | "Sentence";
1320
+ type ConvertKey<K extends string, C extends Case> = string extends K ? string : C extends "Camel" ? CamelWords<Words<K>> : C extends "Pascal" ? Join<CapitalizeAll<Words<K>>, ""> : C extends "Snake" ? Join<Words<K>, "_"> : C extends "Dash" ? Join<Words<K>, "-"> : C extends "UpperSnake" ? Uppercase<Join<Words<K>, "_">> : C extends "UpperDash" ? Uppercase<Join<Words<K>, "-">> : C extends "Train" ? Join<CapitalizeAll<Words<K>>, "-"> : C extends "Dot" ? Join<Words<K>, "."> : C extends "Title" ? Join<CapitalizeAll<Words<K>>, " "> : C extends "Sentence" ? Capitalize<Join<Words<K>, " ">> : never;
1321
+ /**
1322
+ * The type returned by a `toX` function: strings stay `string`, and object keys
1323
+ * in any case (deeply, including inside arrays) are renamed to the case `C`.
1324
+ */
1325
+ type CaseResult<T, C extends Case> = T extends string ? string : T extends Array<unknown> ? { [K in keyof T]: CaseResult<T[K], C>; } : T extends object ? Prettify<{ [K in keyof T as ConvertKey<K & string, C>]: CaseResult<T[K], C>; }> : T;
1326
+ //#endregion
1327
+ //#region src/anyCase/anyCase.d.ts
1328
+ /**
1329
+ * Converts a string, or the keys of an object/array (deeply), from any case to camelCase.
1330
+ *
1331
+ * @example
1332
+ * ```ts
1333
+ * toCamel('hello_world'); // 'helloWorld'
1334
+ * toCamel({ first_name: 'John', userID: 1 }); // { firstName: 'John', userId: 1 }
1335
+ * ```
1336
+ */
1337
+ export declare function toCamel<T extends object | string>(input: T): CaseResult<T, "Camel">;
1338
+ /**
1339
+ * Converts a string, or the keys of an object/array (deeply), from any case to PascalCase.
1340
+ *
1341
+ * @example
1342
+ * ```ts
1343
+ * toPascal('hello-world'); // 'HelloWorld'
1344
+ * toPascal({ 'first-name': 'John', userID: 1 }); // { FirstName: 'John', UserId: 1 }
1345
+ * ```
1346
+ */
1347
+ export declare function toPascal<T extends object | string>(input: T): CaseResult<T, "Pascal">;
1348
+ /**
1349
+ * Converts a string, or the keys of an object/array (deeply), from any case to snake_case.
1350
+ *
1351
+ * @example
1352
+ * ```ts
1353
+ * toSnake('helloWorld'); // 'hello_world'
1354
+ * toSnake({ firstName: 'John', userID: 1 }); // { first_name: 'John', user_id: 1 }
1355
+ * ```
1356
+ */
1357
+ export declare function toSnake<T extends object | string>(input: T): CaseResult<T, "Snake">;
1358
+ /**
1359
+ * Converts a string, or the keys of an object/array (deeply), from any case to dash-case.
1360
+ *
1361
+ * @example
1362
+ * ```ts
1363
+ * toDash('HELLO_WORLD'); // 'hello-world'
1364
+ * toDash({ FIRST_NAME: 'John', userID: 1 }); // { 'first-name': 'John', 'user-id': 1 }
1365
+ * ```
1366
+ */
1367
+ export declare function toDash<T extends object | string>(input: T): CaseResult<T, "Dash">;
1368
+ /**
1369
+ * Converts a string, or the keys of an object/array (deeply), from any case to UPPER_SNAKE_CASE.
1370
+ *
1371
+ * @example
1372
+ * ```ts
1373
+ * toUpperSnake('hello-world'); // 'HELLO_WORLD'
1374
+ * toUpperSnake({ 'first-name': 'John', userID: 1 }); // { FIRST_NAME: 'John', USER_ID: 1 }
1375
+ * ```
1376
+ */
1377
+ export declare function toUpperSnake<T extends object | string>(input: T): CaseResult<T, "UpperSnake">;
1378
+ /**
1379
+ * Converts a string, or the keys of an object/array (deeply), from any case to UPPER-DASH-CASE.
1380
+ *
1381
+ * @example
1382
+ * ```ts
1383
+ * toUpperDash('helloWorld'); // 'HELLO-WORLD'
1384
+ * toUpperDash({ firstName: 'John', userID: 1 }); // { 'FIRST-NAME': 'John', 'USER-ID': 1 }
1385
+ * ```
1386
+ */
1387
+ export declare function toUpperDash<T extends object | string>(input: T): CaseResult<T, "UpperDash">;
1388
+ /**
1389
+ * Converts a string, or the keys of an object/array (deeply), from any case to Train-Case.
1390
+ *
1391
+ * @example
1392
+ * ```ts
1393
+ * toTrain('hello_world'); // 'Hello-World'
1394
+ * toTrain({ first_name: 'John', userID: 1 }); // { 'First-Name': 'John', 'User-Id': 1 }
1395
+ * ```
1396
+ */
1397
+ export declare function toTrain<T extends object | string>(input: T): CaseResult<T, "Train">;
1398
+ /**
1399
+ * Converts a string, or the keys of an object/array (deeply), from any case to dot.case.
1400
+ *
1401
+ * @example
1402
+ * ```ts
1403
+ * toDot('HelloWorld'); // 'hello.world'
1404
+ * toDot({ FirstName: 'John', userID: 1 }); // { 'first.name': 'John', 'user.id': 1 }
1405
+ * ```
1406
+ */
1407
+ export declare function toDot<T extends object | string>(input: T): CaseResult<T, "Dot">;
1408
+ /**
1409
+ * Converts a string, or the keys of an object/array (deeply), from any case to Title Case.
1410
+ *
1411
+ * @example
1412
+ * ```ts
1413
+ * toTitle('hello_world'); // 'Hello World'
1414
+ * toTitle({ first_name: 'John', userID: 1 }); // { 'First Name': 'John', 'User Id': 1 }
1415
+ * ```
1416
+ */
1417
+ export declare function toTitle<T extends object | string>(input: T): CaseResult<T, "Title">;
1418
+ /**
1419
+ * Converts a string, or the keys of an object/array (deeply), from any case to Sentence case.
1420
+ *
1421
+ * @example
1422
+ * ```ts
1423
+ * toSentence('helloWorld'); // 'Hello world'
1424
+ * toSentence({ firstName: 'John', userID: 1 }); // { 'First name': 'John', 'User id': 1 }
1425
+ * ```
1426
+ */
1427
+ export declare function toSentence<T extends object | string>(input: T): CaseResult<T, "Sentence">;
1428
+ //#endregion
1429
+ export type { Case, CaseResult, ParserType, Prettify, Result };