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

Rename IReaderBase.peak() to peek() #6

Open
knutwannheden opened this issue Sep 17, 2024 · 0 comments
Open

Rename IReaderBase.peak() to peek() #6

knutwannheden opened this issue Sep 17, 2024 · 0 comments

Comments

@knutwannheden
Copy link

I noticed that IReaderBase and subtypes define a method called peak(), which probably more appropriately would be called peek(). Although I don't know what the backwards compatibility strategy is for this library, so I thought I would just create an issue for this rather than a PR. Also, I am aware that there are already downstream libraries like json-pack which build on this. Maybe it would make most sense to just deprecate peak().

Background: While in search for a good CBOR library that fits my requirements (allow for synchronous calls as well as low-level SAX-style event processing) I stumbled across json-pack, which fits my bill very nicely. I had a bit of a hard time figuring out how to use it properly, as documentation is very sparse. In the context of a Node application I figured the easiest way to decode CBOR is to construct a new CborDecoder and then call decoder.reader.reset(buffer) on 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

1 participant