+21
| MIT License | ||
| Copyright (c) 2018 Edgar Albalate Ibañez | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
+20
| # micro-body | ||
| Simple body parser for [micro][] | ||
| Use it as expected in your __micro__ module: | ||
| ```javascript | ||
| const microBody = require('micro-body') | ||
| module.exports.POST = async (req, res) => { | ||
| let body = await microBody(req) | ||
| return body | ||
| } | ||
| ``` | ||
| __micro-body__ can parse `urlencoded` and `json` body types, but throws an error if `content-type` header has another type. | ||
| If request hasn't got body or no `content-type` header is present __micro-body__ returns an empty object `{ }`. | ||
| [micro]: https://github.com/zeit/micro |
+1
-1
| { | ||
| "name": "micro-body", | ||
| "version": "0.1.1", | ||
| "version": "0.1.2", | ||
| "description": "micro body parser", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
2746
140.46%4
100%0
-100%21
Infinity%