From 31f17b9976aaba60503f2b5101be769de9432387 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Sep 2026 23:13:58 +0300 Subject: [PATCH] docs: correct the URL example in snakeizeKeysDeep's JSDoc --- src/utils/case.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/case.ts b/src/utils/case.ts index 326af4091..0f23455f7 100644 --- a/src/utils/case.ts +++ b/src/utils/case.ts @@ -50,8 +50,10 @@ function snakeToCamel(key: string): string { * format the API expects. * * **Acronym caveat:** every uppercase character emits its own underscore, so - * acronym-style keys are split between letters: `URL` → `url`, - * `userID` → `user_i_d`, `NFTContract` → `n_f_t_contract`. This is deliberate + * acronym-style keys are split between letters: `URL` → `u_r_l`, + * `userID` → `user_i_d`, `NFTContract` → `n_f_t_contract`. Only the position-0 + * guard keeps a leading capital from becoming a leading underscore, so `URL` + * loses none of its inner splits. This is deliberate * (the roundtrip with `camelizeKeysDeep` is consistent under generic rules) * but consumers calling `snakeizeKeysDeep` directly should avoid PascalCase * acronyms in key names — use `userId` / `nftContract` instead.