Permalink
Browse files

http: remove pointless use of arguments

PR-URL: #10664
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information...
cjihrig committed Jan 10, 2017
1 parent 022b53c commit a73ab9de0dfd1d62c429263c68640388e88fe847
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/_http_outgoing.js
View
@@ -382,8 +382,8 @@ OutgoingMessage.prototype.setHeader = function setHeader(name, value) {
OutgoingMessage.prototype.getHeader = function getHeader(name) {
if (arguments.length < 1) {
throw new Error('"name" argument is required for getHeader(name)');
if (typeof name !== 'string') {
throw new TypeError('"name" argument must be a string');
}
if (!this._headers) return;
@@ -393,8 +393,8 @@ OutgoingMessage.prototype.getHeader = function getHeader(name) {
OutgoingMessage.prototype.removeHeader = function removeHeader(name) {
if (arguments.length < 1) {
throw new Error('"name" argument is required for removeHeader(name)');
if (typeof name !== 'string') {
throw new TypeError('"name" argument must be a string');
}
if (this._header) {

0 comments on commit a73ab9d

Please sign in to comment.