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

Throw error if the text argument is not a string #55

Merged
merged 4 commits into from
Jun 28, 2020
Merged

Throw error if the text argument is not a string #55

merged 4 commits into from
Jun 28, 2020

Conversation

dchebakov
Copy link
Contributor

resolve #54

@sindresorhus
Copy link
Owner

I think it should rather throw a more explicit type error. Silently accepting non-string would hide potential problems in your code.

@dchebakov
Copy link
Contributor Author

@sindresorhus, added explicit type error, please check

@sindresorhus sindresorhus merged commit 12ee3c1 into sindresorhus:master Jun 28, 2020
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.

Error, unhandled 'error' event
2 participants