bytes
npmv3.1.2Utility to parse a string bytes to bytes and vice-versa
Not recommended for new projects
No — bytes should not be adopted for new projects. Last published 1686 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 1686 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 12 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 2 maintainers, and a contained dependency surface.
- 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 bytes 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
- node >= 0.8
- Module format
- CommonJS only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the bytes README.
var bytes = require('bytes');bytes vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| bytesthis page | 0 | 3 | MIT | 4 years ago |
| color-convert | 299.6M | 1 | MIT | 1 day ago |
| set-cookie-parser | 50.2M | 2 | MIT | 1 day ago |
| meow | 36.7M | 1 | MIT | 1 day ago |
| rgb2hex | 0 | 1 | MIT | 1 day ago |
| strnum | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by bytes v3.1.2. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (4)
Used by
Popular packages that depend on bytes.
Relationship graph
Dependencies (left) and dependents (right) of bytes.
Frequently installed together
Create HTTP error objects
An AST-based pattern checker for JavaScript.
Convert character encodings in pure javascript.
TypeScript definitions for node
Create and parse HTTP Content-Type header
Infer the content-type of a request.
Get and validate the raw body of a readable stream.
Execute a callback when a request closes, finishes, or errors
Next generation testing framework powered by Vite
Delightful JavaScript Testing.
V8 coverage provider for Vitest
Lightweight debugging utility for Node.js and the browser
Release history
No releases in the last two years, typically about 107 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.1.2latest | 4 years ago | 12 KB | MIT |
| 3.1.1 | 4 years ago | 12 KB | MIT |
| 3.1.0 | 7 years ago | 11 KB | MIT |
| 3.0.0 | 9 years ago | — | MIT |
| 2.5.0 | 9 years ago | — | MIT |
| 2.4.0 | 10 years ago | — | MIT |
| 2.3.0 | 10 years ago | — | MIT |
| 2.2.0 | 10 years ago | — | MIT |
| 2.1.0 | 11 years ago | — | MIT |
| 2.0.2 | 11 years ago | — | MIT |
| 2.0.1 | 11 years ago | — | MIT |
| 2.0.0 | 11 years ago | — | MIT |
| 1.0.0 | 12 years ago | — | MIT |
| 0.3.0 | 12 years ago | — | MIT |
| 0.2.1 | 13 years ago | — | MIT |
Overview
bytes is an npm package that utility to parse a string bytes to bytes and vice-versa. It has 3 known dependents in the graph. The latest version is 3.1.2, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need utility to parse a string bytes to bytes and vice-versa 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).
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 bytes?
No — bytes should not be adopted for new projects. Last published 1686 days ago.
How do I install bytes?
Run `npm install bytes` to add bytes to your npm project.
What license is bytes released under?
bytes is distributed under the MIT license.
How popular is bytes?
npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on bytes.
Is bytes still maintained?
The most recent release of bytes (v3.1.2) was published 4 years ago.
Does bytes run install scripts?
No. bytes does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.