Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8
🌌 Tiniest body parser in the universe. Built for modern Node.js
License
NotificationsYou must be signed in to change notification settings
tinyhttp/milliparsec
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Tiniest body parser in the universe. Built for modern Node.js.
Check outdeno-libs/parsec for Deno port.
- 🛠 JSON / raw / urlencoded / multipart support
- 📦 tiny package size (8KB dist size)
- 🔥 no dependencies
- ✨tinyhttp and Express support
- ⚡ 40% faster than body-parser and 20x faster than formidable
# pnpmpnpm i milliparsec# bunbun i milliparsec
Use a middleware inside a server:
import{createServer}from'node:http'import{json}from'milliparsec'constserver=createServer(async(req:ReqWithBody,res)=>{awaitjson()(req,res,(err)=>voiderr&&res.end(err))res.setHeader('Content-Type','application/json')res.end(JSON.stringify(req.body))})
The parsec is a unit of length used to measure large distances to astronomicalobjects outside the Solar System.
About
🌌 Tiniest body parser in the universe. Built for modern Node.js
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors8
Uh oh!
There was an error while loading.Please reload this page.