raw-body
npmv4.0.0TypeScriptGet and validate the raw body of a readable stream.
Safe to adopt
Yes — raw-body scores well across adoption, maintenance, weight, supply chain, and licensing. 128.5M downloads per week and 3 known dependents. Last published 60 days ago. 4 releases in the last 2 years.
- AAdoption: grade A, Excellent.
128.5M downloads per week and 3 known dependents.
- AMaintenance: grade A, Excellent.
Last published 60 days ago. 4 releases in the last 2 years.
- BWeight: grade B, Good.
Pulls in 7 transitive packages, about 111 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 5 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 raw-body 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.
Licenses in the dependency tree
Every license you inherit by installing raw-body, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=22
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the raw-body README.
import getRawBody, { getRawBodyWeb } from 'raw-body'Dependencies
Declared by raw-body v4.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (11)
Used by
Popular packages that depend on raw-body.
Relationship graph
Dependencies (left) and dependents (right) of raw-body.
Frequently installed together
TypeScript-first schema declaration and validation library with static type inference
An AST-based pattern checker for JavaScript.
Create and parse HTTP Content-Type header
Prettier is an opinionated code formatter
Fast, unopinionated, minimalist web framework
Next generation testing framework powered by Vite
Node.js CORS middleware
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
Cross platform child_process#spawn and child_process#spawnSync
TypeScript definitions for node
TypeScript definitions for ws
TypeScript definitions for cors
Release history
4 releases in the last two years, typically about 104 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.0.0latest | 2 months ago | 29 KB | MIT |
| 2.5.3 | 9 months ago | 18 KB | MIT |
| 3.0.2 | 9 months ago | 18 KB | MIT |
| 3.0.1 | 1 year ago | 26 KB | MIT |
| 3.0.0 | 2 years ago | 26 KB | MIT |
| 3.0.0-beta.1 | 3 years ago | 25 KB | MIT |
| 2.5.2 | 3 years ago | 25 KB | MIT |
| 2.5.1 | 4 years ago | 25 KB | MIT |
| 2.5.0 | 4 years ago | 25 KB | MIT |
| 2.4.3 | 4 years ago | 22 KB | MIT |
| 2.4.2 | 4 years ago | 22 KB | MIT |
| 2.4.1 | 7 years ago | 22 KB | MIT |
| 2.4.0 | 7 years ago | 22 KB | MIT |
| 2.3.3 | 8 years ago | 22 KB | MIT |
| 2.3.2 | 9 years ago | — | MIT |
Overview
raw-body is an npm package that get and validate the raw body of a readable stream. It is extremely widely used, with about 128.5M downloads per week and 3 known dependents in the graph. The latest version is 4.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need get and validate the raw body of a readable stream and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (128.5M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use raw-body?
Yes — raw-body scores well across adoption, maintenance, weight, supply chain, and licensing. 128.5M downloads per week and 3 known dependents. Last published 60 days ago. 4 releases in the last 2 years.
How do I install raw-body?
Run `npm install raw-body` to add raw-body to your npm project.
How many dependencies does raw-body have?
raw-body declares 13 direct dependencies and pulls in 7 packages in total once its runtime tree is resolved totalling about 111 KB on disk.
What license is raw-body released under?
raw-body is distributed under the MIT license. Its dependency tree also includes: ISC, MIT.
How popular is raw-body?
raw-body has approximately 128,537,919 downloads per week and 3 known dependent packages.
Is raw-body still maintained?
The most recent release of raw-body (v4.0.0) was published 2 months ago.
Does raw-body run install scripts?
No. raw-body does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.