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

enhancement(remap): Add charset parameter to encode_base64 function #6065

Merged
merged 7 commits into from Jan 15, 2021

Conversation

lucperkins
Copy link
Contributor

Adds a charset parameter to the encode_base64 function with two possible values: standard and url_safe. It's fairly trivial to add others in the future.

Closes #6011

Luc Perkins added 3 commits January 14, 2021 13:21
Signed-off-by: Luc Perkins <luc@timber.io>
Signed-off-by: Luc Perkins <luc@timber.io>
Signed-off-by: Luc Perkins <luc@timber.io>
Signed-off-by: Luc Perkins <luc@timber.io>
Signed-off-by: Luc Perkins <luc@timber.io>
Copy link
Member

@jszwedko jszwedko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

I think, with this addition, the function should be marked as always fallible given that users can pass invalid charsets.

Signed-off-by: Luc Perkins <luc@timber.io>
@lucperkins
Copy link
Contributor Author

@jszwedko Ah yes, you're quite right about the fallibility of the charset. I've updated that.

Copy link
Member

@jszwedko jszwedko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥳

@lucperkins
Copy link
Contributor Author

lucperkins commented Jan 15, 2021

@jszwedko Though, quick nit slash FYI: it doesn't make the function always fallible. Rather, it makes the function fallible if charset is specified. Jean's handy merge_optional handles that nicely.

Signed-off-by: Luc Perkins <luc@timber.io>
@lucperkins lucperkins merged commit 158c7d7 into master Jan 15, 2021
@lucperkins lucperkins deleted the remap-base64-charsets branch January 15, 2021 20:04
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.

Support character sets in the encode_base64 Remap function
2 participants