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 🙏

© 2026 – Pkg Stats / Ryan Hefner

flexy-buffer

v1.1.1

Published

Flexible buffer for node.js and browser.

Readme

flexy-buffer

NPM Version NPM Downloads CI Tests Test Coverage

A flexible, auto-growing binary buffer for Node.js. BufferReader gives you a sequential, typed read cursor over a Buffer; FlexyBuffer extends it with write methods and automatic, page-based capacity management, so you don't have to size a buffer up front or manage reallocation yourself.

📖 Full API documentation

Features

  • Typed reads and writes for 8/16/32/64-bit integers (BE/LE), 64-bit BigInt, 32/64-bit floats, raw bytes, and strings
  • Auto-growing capacity in configurable, page-sized chunks, with a byte-exact maxLength cap
  • Automatic housekeeping - idle capacity is reclaimed after a configurable interval
  • insertBytes()/delete() for shifting data in place, fill() for padding
  • start()/flush() to build and extract framed messages from a reused buffer
  • Zero runtime dependencies

Installation

npm install flexy-buffer --save

Quick start

import { FlexyBuffer } from 'flexy-buffer';

const buf = new FlexyBuffer({ pageSize: 4096 });

// Write different types of data
buf.writeUInt32BE(42);
buf.writeString('Hello, World!', 'utf8');
buf.writeBytes(Buffer.from([1, 2, 3, 4]));

// Read data back by repositioning
buf.moveTo(0);
const number = buf.readUInt32BE();
const text = buf.readString(13, 'utf8');

// Build and extract a message, then reuse the buffer
buf.start();
buf.writeUInt32BE(1);
buf.writeString('hi', 'utf8');
const message = buf.flush(); // copy of the bytes written above; buf is reset for reuse

See the full API documentation for every method, configuration option, error code, and more recipes.

Support

You can report bugs and discuss features on the GitHub issues page. When you open an issue please provide the version of Node.js and of flexy-buffer you are using.

Node Compatibility

  • node >= 16.0

License

MIT