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

Add toString as an alias to toBase64 for ByteSequence #61

Open
CxRes opened this issue Mar 18, 2024 · 1 comment
Open

Add toString as an alias to toBase64 for ByteSequence #61

CxRes opened this issue Mar 18, 2024 · 1 comment

Comments

@CxRes
Copy link
Contributor

CxRes commented Mar 18, 2024

I am trying to write a comparator for Items. The simplest thing will be match the type and compare the values. Amongst the non-primitive types, I cannot coerce only ByteSequence to a string using toString but have to use toBase64 instead. Adding toString as an alias will fix this!

@evert
Copy link
Collaborator

evert commented Mar 20, 2024

I considered this, but given that ByteSequence is somewhat similar to Node's Buffer and JS's TypedArray family, it didn't feel good to add toString().

However, given that UInt8Array is widely available now I think a future version should probably ditch ByteSequence altogether and switch to it.

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

No branches or pull requests

2 participants