Conversation
The parse() function accepts strings of length 1 to 100, but the error message stated 1 to 99. Aligns the message with the actual validation, matching the intent of PR vercel#89 ("Limit str to 100").
malapeiro
force-pushed
the
fix-parse-length-message
branch
from
September 24, 2026 22:17
afa8389 to
fdb08f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parse()accepts strings with length between 1 and 100, but the errormessage and JSDoc state the range is "between 1 and 99". A string of
exactly 100 characters is valid input and parses successfully,
contradicting the documented contract.
Notably, PR #89 (which introduced this limit) is titled "Limit str to 100",
so the current validation reflects the original intent — the message text
is what's incorrect.
Reproduction
Suggested fix
Update the error message and JSDoc to say "between 1 and 100" instead of
"between 1 and 99" (one line in
src/index.ts).