buffer

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

Library
npm
v6.0.3
1,888stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
44/100Fair
Development Activity0
Maintenance0
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
84/100Excellent
Architecture85
Code Quality88
Innovation80
Learning Curve90

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 38 apps in this directory

TypeScript
99%
Other

Activepieces

Automation · AI Assistants

23,887

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
65
Dependency
Built with
TypeScript99%
Updated today
TypeScript
94%
MIT

Actual

Invoicing Finance

28,224

Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.

View details
93
Repo Health
85
Technical
77
Dependency
Built with
TypeScript94%
Updated yesterday
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
JavaScript
95%
MIT

AnythingLLM

Developer Tools · Automation · AI Assistants

64,914

The all-in-one AI platform for private document chat, no-code agents, and local LLMs with zero setup friction.

View details
91
Repo Health
78
Technical
68
Dependency
Built with
JavaScript95%
Updated today
Go
60%
Apache 2.0

Apache Answer

Community

15,652

Open-source Q&A platform for communities, help centers, and knowledge bases with AI assistant and plugin extensibility

View details
85
Repo Health
78
Technical
69
Dependency
Built with
Go60%
TypeScript36%
Updated 2 days ago
Go
55%
Apache 2.0

Authgear

Authentication

1,989

Open-source, self-hostable authentication platform with passkeys, biometric login, SSO, MFA, and GraphQL admin API — a full Auth0/Clerk/Firebase alternative for SaaS and mobile apps.

View details
88
Repo Health
81
Technical
72
Dependency
Built with
Go55%
HTML26%
TypeScript17%
Updated yesterday
Rust
67%
MIT

Bun

Developer Tools

95,452

An all-in-one JavaScript and TypeScript toolkit — one Rust-and-JavaScriptCore binary that replaces Node.js, npm, a bundler, and a test runner with faster equivalents.

View details
92
Repo Health
91
Technical
66
Dependency
Built with
Rust67%
C++19%
Updated today
TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
TypeScript
72%
MIT

Claude Context

AI Code Assistants

12,417

An MCP server and VS Code extension by Zilliz that turns your entire codebase into semantically searchable context for Claude Code, Cursor, and Gemini CLI, using vector embeddings and Merkle-tree change detection.

View details
55
Repo Health
71
Technical
72
Dependency
Built with
TypeScript72%
Python13%
JavaScript11%
Updated 1 months 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

Search