</>PackageGraphPackageGraph

buffer-from

npmv1.1.2

A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.

Not recommended for new projects

No — buffer-from should not be adopted for new projects. Last published 1868 days ago.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • FMaintenance: grade F, Failing.

    Last published 1868 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 4.9 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 buffer-from to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

4.9 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
No constraint declared
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the buffer-from README.

const bufferFrom = require('buffer-from')

console.log(bufferFrom([1, 2, 3, 4]))
//=> <Buffer 01 02 03 04>

const arr = new Uint8Array([1, 2, 3, 4])
console.log(bufferFrom(arr.buffer, 1, 2))
//=> <Buffer 02 03>

console.log(bufferFrom('test', 'utf8'))
//=> <Buffer 74 65 73 74>

const buf = bufferFrom('test')
console.log(bufferFrom(buf))
Example truncated — see the full README.

buffer-from vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
buffer-fromthis page02MIT5 years ago
@xtuc/ieee75401BSD-3-Clause1 day ago
is-shared-array-buffer01MIT1 day ago
jsesc01MIT1 day ago
smart-buffer01MIT1 day ago
data-uri-to-buffer01MIT1 day ago

Dependencies

Declared by buffer-from v1.1.2. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (1)

standard ^12.0.1

Used by

Popular packages that depend on buffer-from.

Relationship graph

Dependencies (left) and dependents (right) of buffer-from.

libpqsource-map-supportbuffer-from
buffer-from dependencies dependents

Frequently installed together

Release history

No releases in the last two years, typically about 78 days apart.

Recent versions of buffer-from
VersionPublishedSizeLicense
1.1.2latest5 years ago4.9 KBMIT
1.1.18 years ago4.8 KBMIT
1.1.08 years ago3.8 KBMIT
1.0.08 years ago4.2 KBMIT
0.1.28 years ago4.2 KBMIT
0.1.110 years agoMIT
0.1.010 years agoMIT

Overview

buffer-from is an npm package that a [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available. It has 2 known dependents in the graph. The latest version is 1.1.2, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need a [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available and value a focused 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

  • Clear open-source license (MIT).
  • Lean dependency tree (1 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

Keywords

Frequently asked questions

Should I use buffer-from?

No — buffer-from should not be adopted for new projects. Last published 1868 days ago.

How do I install buffer-from?

Run `npm install buffer-from` to add buffer-from to your npm project.

What license is buffer-from released under?

buffer-from is distributed under the MIT license.

How popular is buffer-from?

npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on buffer-from.

Is buffer-from still maintained?

The most recent release of buffer-from (v1.1.2) was published 5 years ago.

Does buffer-from run install scripts?

No. buffer-from does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.