Node.js Buffer API for the Browser
JSON →The `buffer` package provides a robust and faithful polyfill for Node.js's `Buffer` API, allowing developers to manipulate binary data directly within web browsers. Currently at version 6.0.3, this library is actively maintained and aims for near 100% API compatibility with Node.js's native `Buffer` module, including its latest (unstable) API features, while acknowledging the underlying `Buffer` API itself is stable. It differentiates itself by leveraging modern JavaScript `Uint8Array` and `ArrayBuffer` for high performance and efficient memory use, resulting in an extremely small bundle size (6.75KB minified + gzipped). This approach ensures broad browser compatibility across Chrome, Firefox, Edge, Safari 11+, iOS 11+, and Android. The package is a crucial component for enabling many Node.js modules to function seamlessly in browser environments, often used in conjunction with bundlers like Browserify which automatically substitute Node's core `buffer` module with this browser-compatible version, providing a consistent binary data handling experience.
Traffic · last 30 days ↓37% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France