Skip to content

🐛 fix: Validate size parameter in Hex.padLeft/padRight#275

Merged
roninjin10 merged 1 commit intomainfrom
fix/issue-96-hex-pad
Jan 4, 2026
Merged

🐛 fix: Validate size parameter in Hex.padLeft/padRight#275
roninjin10 merged 1 commit intomainfrom
fix/issue-96-hex-pad

Conversation

@roninjin10
Copy link
Contributor

Summary

Test plan

  • Negative size rejected
  • Float size rejected
  • NaN rejected
  • Infinity rejected

🤖 Generated with Claude Code

Add InvalidSizeError and validation to ensure targetSize is a non-negative integer.
Previously, negative values, NaN, Infinity, and non-integers could cause unexpected behavior or RangeErrors.

Fixes #96

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 4, 2026

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

Project Deployment Review Updated (UTC)
dist Error Error Jan 4, 2026 11:11am
voltaire Error Error Jan 4, 2026 11:11am

@roninjin10 roninjin10 merged commit d61d989 into main Jan 4, 2026
19 of 48 checks passed
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.

Bug: Hex.padLeft/padRight don't validate size parameter

1 participant