Skip to content

docs: align reference section headings across the four languages and fix mismatched examples - #2235

Open
Archibald1948 wants to merge 11 commits into
toss:mainfrom
Archibald1948:docs/sync-reference-section-headings
Open

Archibald1948 wants to merge 11 commits into
toss:mainfrom
Archibald1948:docs/sync-reference-section-headings

Conversation

@Archibald1948

Copy link
Copy Markdown
Contributor

Summary

Reference pages that drifted apart between the four languages. I compared every
page's section headings and every code block across docs/reference,
docs/compat/reference and their ko, ja, zh_hans translations, and fixed
the cases where one language disagreed with the other three. The naming comes
from the translation table in docs/CLAUDE.md
(Usage = 사용법 / 使用法 / 用法, Throws = 에러 / エラー / 错误).

Nothing here changes the documented behavior; the examples themselves still run
exactly as documented.

Section headings (22 files)

Language Heading used Pages Changed to
English #### Errors 7 #### Throws (the other 35 pages, and every page added this year)
English ## Reference on at 1 ## Usage (all three translations of the page)
Korean #### 예외 2 #### 에러 (the other 40 pages)
Japanese #### 例外 2 #### エラー (the other 40 pages)
Japanese ## 使い方, ## インターフェース 5 ## 使用法 (the other 531 pages)
Chinese #### 抛出错误, #### 抛出 4 #### 错误 (the other 38 pages)
Chinese ## 参考 on compact 1 ## 用法 (all three other languages of the page)

## Reference stays on the *Async and limitAsync pages, where all four
languages agree on it.

Examples and signatures (7 files)

  • forEach (Map, Set), Korean: the parameter was called callbackfn; the
    implementation and the other three languages call it callback.
  • toPascalCaseKeys, Korean and Chinese: the example meant to show that
    camelCase keys are converted, but passed { UserId: 1, FIRST_NAME: 'JinHo', LAST: 'Yeom' } —
    a key that is already PascalCase — so it demonstrated nothing. English and
    Japanese pass { userId: 1, ... }.
  • toKebabCaseKeys, Chinese: the signature at the top assigned to
    snakeCased, left over from toSnakeCaseKeys.
  • flatMap, flatMapDeep (compat): the signature at the top wrote
    iteratee, while iteratee is optional and defaults to identity. The ###
    heading on the same page, the three translations and the sibling
    flatMapDepth page all write iteratee?.

How I checked

Three throwaway scripts, not part of this PR:

  1. Executed every runnable ```typescript block in the English reference docs and
    compared each statement with its // Returns: comment — 1,327 statements,
    0 mismatches, so the examples' documented results are all still correct.
  2. Compared each English code block with its three translations, ignoring string
    literals and comments. After this PR the only remaining differences are the
    deliberately localized strings in isRegExp.
  3. Compared the section-heading sequence of each page across the four languages.
    After this PR the only remaining differences are the ## Examples sections
    below.

yarn format:check passes and yarn lint reports no new errors.

Left out

Ten array pages (countBy, flatMap, flatMapDeep, groupBy, keyBy,
maxBy, minBy, takeWhile, takeRightWhile, uniqBy) have an ## Examples
section in English that none of the three translations have, and debounce,
memoize and unzipWith have one in Japanese only. Those need the sections
written, not moved, so I left them for a follow-up — happy to take it on if you
would like it.

🤖 Generated with Claude Code

https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm

Archibald1948 and others added 11 commits December 2, 2026 12:53
Seven pages titled the error section `#### Errors` while the other 35
pages use `#### Throws`. `Throws` is what docs/CLAUDE.md maps the Korean,
Japanese and Chinese headings to, and what every page added this year uses.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
The English page titled the section `## Reference`, which only the
`*Async` pages use, while the Korean, Japanese and Chinese versions of
this page all use Usage.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Two pages used 예외; the other 40 Korean pages and docs/CLAUDE.md use 에러.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Two pages used 例外; the other 40 Japanese pages and docs/CLAUDE.md use エラー.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Five pages used 使い方 or インターフェース; the other 531 Japanese pages and
docs/CLAUDE.md use 使用法.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Four pages used 抛出错误 or 抛出; the other 38 Chinese pages and
docs/CLAUDE.md use 错误.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
The page used 参考, which only the `*Async` pages use, while the English,
Korean and Japanese versions of this page all use Usage.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
The Korean pages for Map and Set `forEach` called the parameter
`callbackfn`, while the implementation and the other three languages
call it `callback`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
The Korean and Chinese pages passed `{ UserId: 1, ... }`, a key that is
already PascalCase, so the example no longer showed a conversion. The
English and Japanese pages pass `{ userId: 1, ... }`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
…ature

The signature at the top assigned to `snakeCased`, left over from
`toSnakeCaseKeys`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
`iteratee` is optional and defaults to identity. The `###` heading on the
same page, the three translations and the sibling `flatMapDepth` page all
write `iteratee?`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Copilot AI balanced review requested due to automatic review settings December 2, 2026 03:53
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
es-toolkit Ready Ready Preview Dec 2, 2026 3:59am UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch was successfully deployed

1 active deployment
Preview — 97f3f710 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants