npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

binopsy

v0.0.0

Published

Reimplementation of binary-parser supporting serialization and streaming

Downloads

26

Readme

binopsy

Reimplementation of keichi/binary-parser, supporting both streams and serialization.

The API is mainly the same as binary-parser's, with a couple of additions and one removed method.

Dropped support for .skip

Due to undefined behavior, .skip is not supported. As a workaround the .buffer method can be used.

.stream

The .stream method returns a transform stream that reads incoming data and emits parser results. The parser instance is looped until the end of the input is reached.

.serialize

As a counterpart to binary-parser's .parse method, .serialize takes an object and returns a buffer representation of it. Optionally, an already allowcated buffer can be passed as a second argument.

.fixedSizeNest

.fixedSizeNest is a variation of nest that ensures the nested parser reads a specific amount of bytes. Fixed-size nested parsers are the only source of ambiguity remaining while serializing, as missing bytes are simply skipped. And error is thrown during serialization if the nested parser attempts to write more bytes than the size permits.

formatters require a deformatter

Properties with a specified formatting function need to also provide a deformatter function that restores the original value.

flatten option

As a very simple extension, the flatten option allows nested parsers to write to the current object. Its motivation is the aim for a flat output structure after .choice calls.

Bitfields can be (almost) infinitely long

A relaxation from the 32 bit limit of binary-parser. Also, a bug of the original project that leads to the bit32 method always parsing a value of 0 is not present.

License: MIT