Skip to content

docs(trimStart, trim): document error thrown for multi-character string chars - #1936

Merged
raon0211 merged 1 commit into
toss:mainfrom
Hprogram:docs/issue-1931-trim-errors
Jul 22, 2026
Merged

raon0211 merged 1 commit into
toss:mainfrom
Hprogram:docs/issue-1931-trim-errors

Conversation

@Hprogram

Copy link
Copy Markdown
Contributor

Summary

Related to #1931.

trimStart and trim throw when chars is a string whose length is not 1 (validation added in #1615 for trimStart; trimEnd has the same validation and trim delegates to both), but only trimEnd's reference docs document this with an #### Errors section. This adds the missing Errors sections to trimStart and trim, mirroring the existing trimEnd wording in each language.

Changes

  • Add #### Errors section to trimStart.md and trim.md in all four languages (en / ko / ja / zh_hans, 8 files), placed after #### Returns to match the structure of trimEnd.md

Test results

  • Docs-only change; wording, section placement, and punctuation mirror the existing trimEnd.md sections per language
  • yarn prettier --check passes on all touched files

@vercel

vercel Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
es-toolkit Ready Ready Preview, Comment Jul 22, 2026 2:13am

Request Review

@raon0211 raon0211 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@raon0211
raon0211 merged commit 3463e16 into toss:main Jul 22, 2026
11 checks passed
racgoo pushed a commit to racgoo/es-toolkit that referenced this pull request Jul 28, 2026

This branch was successfully deployed

1 active deployment
Preview — 8e7c03ac Deployed Jul 22, 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