Skip to content

throw an error if encode input is not a buffer#18

Open
Kikobeats wants to merge 1 commit intoRGBboy:masterfrom
Kikobeats:patch-3
Open

throw an error if encode input is not a buffer#18
Kikobeats wants to merge 1 commit intoRGBboy:masterfrom
Kikobeats:patch-3

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