Skip to content

Handle empty string as input #8

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

Merged
merged 2 commits into from
Mar 19, 2020
Merged

Handle empty string as input #8

merged 2 commits into from
Mar 19, 2020

Conversation

hsablonniere
Copy link
Contributor

Hey @sindresorhus ;-)

I guess it's the first time I'm proposing a PR on one of the many projects you work on and I enjoy using. Thanks again for everything. 👏

stringLength('') fails on empty strings. I think it comes from the recent modification you did with char-regex/astral-regex and the match/replace.

I modified the test and the source just to naïvely fix my problem. Maybe you would fix it another way but if it helps, here's my humble PR ;-)

Thanks

@sindresorhus sindresorhus changed the title Handle empty strings Handle empty string as input Mar 19, 2020
@sindresorhus sindresorhus merged commit cb19fd4 into sindresorhus:master Mar 19, 2020
@hsablonniere hsablonniere deleted the fix-empty-string branch March 25, 2020 09:59
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