New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 2.0.1 to 2.1.1

7

error.js

@@ -6,10 +6,11 @@ var sendJson = require("./json")

function sendError(req, res, opts) {
if (!opts.statusCode || !opts.error) {
opts = { error: opts, statusCode: 500 }
if (!opts.statusCode || !opts.body || !opts.headers) {
opts = { body: opts, statusCode: 500 }
}
var error = opts.error
var error = opts.body
var statusCode = opts.statusCode
var headers = opts.headers
var body
if (Array.isArray(error)) {

@@ -16,0 +17,0 @@ body = { errors: error }

{
"name": "send-data",
"version": "2.0.1",
"version": "2.1.1",
"description": "send data through response",

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

@@ -75,3 +75,3 @@ # send-data [![build status][1]][2]

send-data/error := (HttpRequest, HttpResponse, MaybeErrorObject | {
error: MaybeErrorObject,
body: MaybeErrorObject,
statusCode?: Number,

@@ -78,0 +78,0 @@ headers?: Object<String, String>

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