المشاريع
عرض على GitHub
tinyhttp/milliparsec
حول
🌌 Tiniest body parser in the universe. Built for modern Node.js
أدوات التطويرما يمكنك فعله
- 🛠 JSON / raw / urlencoded / multipart support
- 📦 tiny package size (8KB dist size)
- 🔥 no dependencies
- ✨ tinyhttp and Express support
النمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- +١
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلTiniest body parser in the universe. Built for modern Node.js.
Check out deno-libs/parsec for Deno port.
Features
- 🛠 JSON / raw / urlencoded / multipart support
- 📦 tiny package size (8KB dist size)
- 🔥 no dependencies
- ✨ tinyhttp and Express support
- ⚡ ~15% faster than body-parser, ~4x faster than formidable
Install
# pnpm
pnpm i milliparsec
# bun
bun i milliparsec
Usage
Basic example
Use a middleware inside a server:
import { createServer } from 'node:http'
import { json } from 'milliparsec'
const server = createServer(async (req: ReqWithBody, res) => {
await json()(req, res, (err) => void err && res.end(err))
res.setHeader('Content-Type', 'application/json')
res.end(JSON.stringify(req.body))
})
What is "parsec"?
The parsec is a unit of length used to measure large distances to astronomical objects outside the Solar System.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…