Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for javascript numbers #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ArtskydJ
Copy link
Contributor

@ArtskydJ ArtskydJ commented Apr 1, 2022

The docs say that it supports a string... But is seems to support js numbers too. And people are gonna pass in JS numbers unless it's forbidden. So to avoid an accidental behavior-breaking change in the future, I figured I'd add a test.

In semver, since you documented that functions require strings, I suppose it wouldn't require a major version bump if you disallowed js numbers as inputs. In practice, that feels kinda wrong.

Note I ran the tests locally and they passed, including my new test.

@micahswab
Copy link

It would be a real drag to have to manually call toString on every number input variable 😅

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