[Pkg-javascript-commits] [node-stream-http] 42/208: Fix unnecessary uses of util
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 13:39:26 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-http.
commit 9d80ac6def05760fadb0022d3fa22d4e4918cb35
Author: John Hiesey <john at hiesey.com>
Date: Sun Jul 12 14:53:08 2015 -0700
Fix unnecessary uses of util
---
index.js | 3 +--
lib/response.js | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/index.js b/index.js
index 4e88c71..3aa8d7f 100644
--- a/index.js
+++ b/index.js
@@ -2,7 +2,6 @@ var ClientRequest = require('./lib/request')
var extend = require('xtend')
var statusCodes = require('builtin-status-codes')
var url = require('url')
-var util = require('util')
var http = exports
@@ -26,7 +25,7 @@ http.request = function (opts, cb) {
opts.hostname = opts.hostname || hostHostname || window.location.hostname
opts.port = opts.port || hostPort || defaultPort
- if (util.isUndefined(opts.withCredentials))
+ if (opts.withCredentials === undefined)
opts.withCredentials = true
// Also valid opts.auth, opts.mode
diff --git a/lib/response.js b/lib/response.js
index 0ceae66..101f194 100644
--- a/lib/response.js
+++ b/lib/response.js
@@ -59,7 +59,7 @@ var IncomingMessage = exports.IncomingMessage = function (xhr, response, mode) {
var matches = header.match(/^([^:]+):\s*(.*)/)
if (matches) {
var key = matches[1].toLowerCase()
- if (!util.isUndefined(self.headers[key]))
+ if (self.headers[key] !== undefined)
self.headers[key] += ', ' + matches[2]
else
self.headers[key] = matches[2]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git
More information about the Pkg-javascript-commits
mailing list