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

send-data

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

send-data - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

6

index.js
var Buffer = require("buffer").Buffer
var zlib = require("zlib")
var CALLBACK_REQUIRED = "send(req, res, opts, callback). Callback is required"
var isGzip = /\bgzip\b/

@@ -24,2 +25,6 @@

if (gzip && acceptsGzip(req)) {
if (!callback) {
throw new Error(CALLBACK_REQUIRED)
}
zlib.gzip(body, function (err, body) {

@@ -32,2 +37,3 @@ if (err) {

res.setHeader("Content-Encoding", "gzip")
res.setHeader("Content-Length", body.length)

@@ -34,0 +40,0 @@ res.end(body)

2

package.json
{
"name": "send-data",
"version": "3.0.3",
"version": "3.0.4",
"description": "send data through response",

@@ -5,0 +5,0 @@ "keywords": [],

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