node-mocks-http
Advanced tools
Comparing version 1.0.4 to 1.1.0
@@ -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 () { |
@@ -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", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
39433
1057
1