Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

then-busboy

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

then-busboy - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "then-busboy",
"version": "1.0.3",
"version": "1.0.4",
"description": "Promise-based wrapper around Busboy, inspired by async-busboy",

@@ -5,0 +5,0 @@ "main": "main.js",

# then-busboy
Promise-based wrapper around Busboy, inspired by async-busboy
Promise-based wrapper around Busboy, inspired by [async-busboy](https://github.com/m4nuC/async-busboy)
[![dependencies Status](https://david-dm.org/octet-stream/then-busboy/status.svg?style=flat-square)](https://david-dm.org/octet-stream/then-busboy)
[![devDependencies Status](https://david-dm.org/octet-stream/then-busboy/dev-status.svg?style=flat-square)](https://david-dm.org/octet-stream/then-busboy?type=dev)
## Installation

@@ -22,2 +25,10 @@

### busboy(request[, options]) -> Promise
* http.IncomingMessage **request** - HTTP request object
* object **options**
- boolean **split** - If set as `true`, the `data`
object will be split into two other objects: `fields` and `files`.
- more information about busboy options [here](https://github.com/mscdex/busboy#busboy-methods).
Just import `then-busboy` and pass `request` object as first argument.

@@ -59,15 +70,21 @@

createServer(callback)
.listen(2319, () => console.log("Server started on http://localhost:2319"))
.listen(2319, () => console.log("Server started on http://localhost:2319"));
```
`then-busboy` always return a Promise, so you can use it with
`then-busboy` always returns a Promise, so you can use it with
[asynchronous function](https://github.com/tc39/ecmascript-asyncawait) syntax:
```js
// Some your awesome code with async workflow...
// Some of your awesome code with async workflow...
var data = await busboy(req);
```
And the same code, but with `split: true` option:
```js
var {fields, files} = await busboy(req, {split: true});
```
## License
[MIT](https://github.com/octet-stream/then-busboy/blob/master/LICENSE)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc