Add Base64Url encoding by JordanMartinez · Pull Request #56 · purescript-node/purescript-node-buffer
Description of the change
- Add Base64Url encoding.
Checklist:
- Added the change to the changelog's "Unreleased" section with a reference to this PR (e.g. "- Made a change (#0000)")
- Linked any existing issues or proposals that this pull request should close
- Updated or added relevant documentation
- Added a test for the contribution (if applicable)
JordanMartinez
changed the title
update encoding
Add Base64Url encoding; drop aliased encodings
Has Node indicated that they will drop these aliases? What harm do you see in retaining them?
The UCS2 one not so much, but the binary one is confusing. Per Node docs
'binary': Alias for 'latin1'. See binary strings for more background on this topic. The name of this encoding can be very misleading, as all of the encodings listed here convert between strings and binary data (emphasis mine). For converting between strings and Buffers, typically 'utf8' is the right choice.
Regardless, this is one of those "controversial" changes, and I don't want to be blocked by this. I'll revert the commit.
JordanMartinez
changed the title
Add Base64Url encoding; drop aliased encodings
Add Base64Url encoding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters