Socket
Socket
Sign inDemoInstall

node-mocks-http

Package Overview
Dependencies
0
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.1.0

29

lib/mockResponse.js

@@ -236,2 +236,15 @@ 'use strict';

/**
* Function: header
*
* An alias of either getHeader or setHeader depending on
* the amount of passed parameters.
*/
header: function (name, value) {
if(typeof value !== 'undefined'){
return this.setHeader(name, value);
}else{
return this.getHeader(name);
}
},

@@ -248,2 +261,9 @@ /**

/**
* Function: get
*
* An alias of getHeader.
*/
get: this.getHeader,
/**
* Function: setHeader

@@ -259,2 +279,9 @@ *

/**
* Function: set
*
* An alias of setHeader.
*/
set: this.setHeader,
/**
* Function: removeHeader

@@ -332,3 +359,3 @@ *

// end: function(){
// return writableStream.end.apply(this, arguments);
// return writableStream.end.apply(this, arguments);
// },

@@ -335,0 +362,0 @@ destroy: function () {

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Mock 'http' objects for testing Express routing functions",
"version": "1.0.4",
"version": "1.1.0",
"homepage": "http://www.github.com/howardabrams/node-mocks-http",

@@ -8,0 +8,0 @@ "license" : "MIT",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc