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

lightserve

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightserve - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

2

package.json
{
"name": "lightserve",
"version": "0.1.5",
"version": "0.1.6",
"description": "Lightweight NodeJS web server",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -125,2 +125,16 @@ # LightServe

#### `body: object`
The `body` object contains all the request body (for all requests but multipart ones where it is undefined).
#### `multipart: object`
The `multipart` object contains the request multipart body.
Each key of the object is a field name, each value is an object with a `type` property which value can be `field` or `file`.
**For fields** : The value is the string representation of what has been sent.
**For files** : The value is a buffer containing the file data.
#### `context: object`

@@ -127,0 +141,0 @@

@@ -5,5 +5,9 @@ const multiparty = require('multiparty')

return new Promise((resolve, reject) => {
let contents = ''
let contents = null
part.on('data', (chunk) => {
contents += chunk.toString()
if (!contents) {
contents = chunk
} else {
contents = Buffer.concat([contents, chunk])
}
}).on('end', () => {

@@ -10,0 +14,0 @@ resolve(contents)

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