buffer

The Node.js Buffer API, reimplemented for the browser on top of Uint8Array.

Library
npm
v6.0.3
1,893 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
44 /100 Fair
Development Activity 0
Maintenance 0
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
84 /100 Excellent
Architecture 85
Code Quality 88
Innovation 80
Learning Curve 90

Buffer is a drop-in implementation of Node.js’s Buffer API that runs in the browser. It provides an API that is 100% identical to node’s Buffer, so npm modules that assume Buffer is available continue to work when bundled for the browser with tools like browserify, webpack, Vite, or esbuild.

Under the hood, Buffer instances are real Uint8Array objects whose prototype chain is extended with the full set of node Buffer methods. That means square-bracket indexing works, typed-array methods are available, and binary data manipulation stays fast without patching any browser globals or prototypes.

What You Get

  • A Buffer class that mirrors the full Node.js Buffer API, including Buffer.from, Buffer.alloc, Buffer.concat, and every read/write accessor.
  • Backing by native Uint8Array and ArrayBuffer for fast, memory-efficient binary data handling.
  • Encoding and decoding across utf8, hex, base64, latin1, ascii, ucs2/utf16le, and base64url.
  • TypeScript type definitions bundled via index.d.ts.
  • A tiny footprint (about 6.75KB minified + gzipped) with no browser-prototype pollution.

Common Use Cases

  • Running Node-oriented npm modules in the browser by letting a bundler polyfill the Buffer global.
  • Reading and writing binary protocols, file formats, or network payloads on the client side.
  • Converting between binary data and text encodings such as base64 and hex.
  • Interoperating with Web APIs by treating a Buffer as the Uint8Array it already is.

Under The Hood

Architecture

The entire library lives in a single index.js module (~59KB) that defines a Buffer function subclassing Uint8Array. Instances are created as Uint8Array objects whose prototype is reset to Buffer.prototype, so every native typed-array capability is inherited while the node Buffer methods are layered on top. A Buffer.TYPED_ARRAY_SUPPORT feature check guards behavior on older engines, and static factories (Buffer.from, Buffer.alloc, Buffer.allocUnsafe, Buffer.concat) plus a large set of instance read/write accessors implement the node contract. The Uint8Array prototype itself is never modified and nothing is attached to window.

Tech Stack

Plain JavaScript with only two small runtime dependencies: base64-js for base64 encode/decode and ieee754 for float/double reads and writes. Bundled TypeScript definitions ship in index.d.ts. Dev tooling uses tape for tests, standard for linting, and browserify/airtap for cross-browser test runs, reflecting a deliberately minimal, dependency-light design.

Code Quality

The project carries a comprehensive test suite (over 1,300 lines across files like test/basic.js, test/from-string.js, test/write.js, and a test/node/ directory that mirrors buffer tests from node.js core). Code follows the standard style, uses explicit bounds and type checks in the accessor methods, and documents non-obvious feature detection inline. The single-file layout is dense but consistent and well-commented.

API Design Developer experience is excellent precisely because the API is not novel — it reproduces the widely-documented node Buffer surface exactly, so existing knowledge and the official node docs apply directly. Getting started requires no configuration: require('buffer').Buffer (or the bundler-provided global) is enough, and TypeScript users get full typings out of the box. Bracket-notation indexing and Uint8Array interop keep boilerplate to a minimum.

Used by 42 apps in this directory

TypeScript
96%
MIT

Orca

AI Agents · AI Code Assistants

104,104

An open-source Agent Development Environment that orchestrates fleets of parallel AI coding agents — Claude Code, Codex, Gemini and more — each running in its own isolated git worktree.

View details
84
Repo Health
85
Technical
74
Dependency
Built with
TypeScript 96%
Updated 6 days ago
TypeScript
98%
AGPL 3.0

paseo

AI Agents · AI Code Assistants

21,830

One unified interface to orchestrate Claude Code, Codex, Copilot, OpenCode, and Pi agents in parallel from desktop, mobile, or the terminal.

View details
88
Repo Health
83
Technical
66
Dependency
Built with
TypeScript 98%
Updated 6 days ago
TypeScript
91%
AGPL 3.0

PeerTube

Social Media

15,362

A federated, ActivityPub-based video hosting platform built by Framasoft — self-hostable instances interconnect into a network with no vendor lock-in, P2P-assisted streaming, and no ads.

View details
96
Repo Health
75
Technical
66
Dependency
Built with
TypeScript 91%
Updated 2 weeks ago
TypeScript
67%
AGPL 3.0

Plane

Collaboration · Productivity · Project Management

61,353

Open-source project management platform to replace Jira, Linear, and ClickUp — with built-in cycles, real-time collaborative docs, and full self-hosting.

View details
92
Repo Health
82
Technical
77
Dependency
Built with
TypeScript 67%
Python 30%
Updated 1 weeks ago
TypeScript
90%
MIT

Plasmic

CMS · Design Tools · Low Code Platforms

7,125

The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.

View details
81
Repo Health
78
Technical
64
Dependency
Built with
TypeScript 90%
Updated 1 weeks ago
TypeScript
51%
ZLIB

Portainer

Devops

38,707

A lightweight, open-source web UI that puts Docker, Kubernetes, and Podman management within reach of any team—no CLI expertise required.

View details
93
Repo Health
79
Technical
65
Dependency
Built with
TypeScript 51%
Go 38%
Updated 1 weeks ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 6 days ago
TypeScript
97%
Other

Rocket.Chat

Team Chat

46,304

The secure, self-hosted team communications platform for organizations that cannot compromise on data sovereignty.

View details
96
Repo Health
79
Technical
63
Dependency
Built with
TypeScript 97%
Updated 6 days ago
TypeScript
99%
Other

Rowy

Databases · Low Code Platforms

6,842

Manage Firestore data in an Airtable-like spreadsheet UI and build Cloud Functions workflows directly in your browser—on your own GCP project.

View details
45
Repo Health
71
Technical
65
Dependency
Built with
TypeScript 99%
Updated 1 years ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers