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 an error if encode input is not a buffer #18

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

Conversation

Kikobeats
Copy link

@Kikobeats Kikobeats commented Mar 24, 2021

This prevents the user to wrongly provide a string, where the method .toString() doesn't accept any parameter.

> '+'.toString('base64')
'+'
> '+'.toString('hex')
'+'

so it's failing silently right now 😬

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