safer-buffer
npmv2.1.2Modern Buffer API polyfill without footguns
Not recommended for new projects
No — safer-buffer should not be adopted for new projects. Last published 3076 days ago.
- AAdoption: grade A, Excellent.
110.7M downloads per week and 5 known dependents.
- FMaintenance: grade F, Failing.
Last published 3076 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 41 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding safer-buffer to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- No constraint declared
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Dependencies
Declared by safer-buffer v2.1.2. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (2)
Used by
Popular packages that depend on safer-buffer.
Contains parsers and serializers for ASN.1 (currently BER only)
A querystring parser that supports nesting and arrays, with a depth limit
Convert character encodings in pure javascript.
string representations of objects in node and the browser
A library for finding and using SSH public keys
Relationship graph
Dependencies (left) and dependents (right) of safer-buffer.
Frequently installed together
An AST-based pattern checker for JavaScript.
the most correct and second fastest glob implementation in JavaScript
`Object.defineProperty`, but not IE 8's broken one.
Runtime typescript and ESM support for Node.js
Store information about any JS value in a side channel. Uses WeakMap if available.
The semantic version parser used by npm.
Convert character encodings in pure javascript.
string representations of objects in node and the browser
[](https://github.com/mmkal/expect-type/actions/workflows/ci.yml)  [](ht
Port of TweetNaCl cryptographic library to JavaScript
Contains parsers and serializers for ASN.1 (currently BER only)
getpass for node.js
Release history
No releases in the last two years, typically about 1 day apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.1.2latest | 8 years ago | 41 KB | MIT |
| 2.1.1 | 8 years ago | 41 KB | MIT |
| 2.1.0 | 8 years ago | 40 KB | MIT |
| 2.0.2 | 8 years ago | 36 KB | MIT |
| 2.0.1 | 8 years ago | 21 KB | MIT |
| 2.0.0 | 8 years ago | 19 KB | MIT |
Overview
safer-buffer is an npm package that modern Buffer API polyfill without footguns. It is extremely widely used, with about 110.7M downloads per week and 5 known dependents in the graph. The latest version is 2.1.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need modern Buffer API polyfill without footguns and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (110.7M weekly downloads).
- Clear open-source license (MIT).
- Lean dependency tree (2 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use safer-buffer?
No — safer-buffer should not be adopted for new projects. Last published 3076 days ago.
How do I install safer-buffer?
Run `npm install safer-buffer` to add safer-buffer to your npm project.
What license is safer-buffer released under?
safer-buffer is distributed under the MIT license.
How popular is safer-buffer?
safer-buffer has approximately 110,736,744 downloads per week and 5 known dependent packages.
Is safer-buffer still maintained?
The most recent release of safer-buffer (v2.1.2) was published 8 years ago.
Does safer-buffer run install scripts?
No. safer-buffer does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.