Skip to content

Conversation

@blakeembrey
Copy link
Member

Follow up to #57, properly handle a bunch of other edge cases in the parser. E.g. 100x, 100.5, multiple dashes, etc. should all be invalid.

@blakeembrey blakeembrey requested review from a team and bjohansebas January 21, 2026 22:56
}

var startStr = arr[i].slice(0, indexOf).trim()
var endStr = arr[i].slice(indexOf + 1).trim()
Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't see whitespace in the spec when I quickly browsed, but examples on MDN do use it and parseInt used to work with it too, so I included it for coverage. Otherwise I wouldn't do .trim() here.

Copy link
Member

@sheplu sheplu left a comment

Choose a reason for hiding this comment

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

LGTM

@blakeembrey blakeembrey merged commit eba9c7a into master Jan 22, 2026
54 checks passed
@blakeembrey blakeembrey deleted the be/better-number-coverage branch January 22, 2026 18:28
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.

4 participants