brianloveswords / base64url

For encoding and decoding base64url!
MIT License
225 stars 44 forks source link

typo in a readme example string #41

Closed map0 closed 5 years ago

MylesBorins commented 5 years ago

trumped by https://github.com/brianloveswords/base64url/pull/42/files. Thanks for opening

Walther commented 5 years ago

Btw, the readme could use an update to the encoded string too 😄 Noticed this when testing the library out and was surprised when the output didn't match the one on the readme, then found this issue.

Compare:

// plaintext from the readme
base64url("ladies and gentlemen we are floating in space")
'bGFkaWVzIGFuZCBnZW50bGVtZW4gd2UgYXJlIGZsb2F0aW5nIGluIHNwYWNl'
// encoded string from the readme
base64url.decode("bGFkaWVzIGFuZCBnZW50bGVtYW4sIHdlIGFyZSBmbG9hdGluZyBpbiBzcGFjZQ")
'ladies and gentleman, we are floating in space'

EDIT: saw this on https://www.npmjs.com/package/base64url - and it seems your fix is newer and hasn't been released & hasn't hit npmjs page yet