1.0.0 • Published 4 years ago

miniparser v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

miniparser

Tiny alternative for the popular body-parser package. Zero dependencies vs 21. Just handles JSON for now.

Install

npm i miniparser

Example

const bodyParser = require('miniparser')
require('polka')()
	.use(bodyParser()) // you can also use bodyParser.json()
	.get('/', (req, res) => {
		console.log(req.body)
		res.end()
	})

If the JSON body is misformatted or unable to be parsed, an empty JSON object will be returned ({})

1.0.0

4 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago