diff options
author | Pedro Lima <pvsousalima@gmail.com> | 2016-10-21 03:21:47 +0000 |
---|---|---|
committer | Italo A. Casas <me@italoacasas.com> | 2016-11-25 13:55:17 -0500 |
commit | 1f45d7aa41291383ce63cca5f80fd2a2a73d7603 (patch) | |
tree | 143450ce28d7788fd9c89a43e97c194aa09f9323 /lib/https.js | |
parent | 630c63ee68df51631fb7ab5557fd2e3e8d97c769 (diff) | |
download | android-node-v8-1f45d7aa41291383ce63cca5f80fd2a2a73d7603.tar.gz android-node-v8-1f45d7aa41291383ce63cca5f80fd2a2a73d7603.tar.bz2 android-node-v8-1f45d7aa41291383ce63cca5f80fd2a2a73d7603.zip |
https: name anonymous functions in https
Naming anonymous function in the https module
PR-URL: https://github.com/nodejs/node/pull/9217
Ref: https://github.com/nodejs/node/issues/8913
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'lib/https.js')
-rw-r--r-- | lib/https.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/https.js b/lib/https.js index b8969b6845..26b6cbf279 100644 --- a/lib/https.js +++ b/lib/https.js @@ -31,7 +31,7 @@ function Server(opts, requestListener) { this.addListener('request', requestListener); } - this.addListener('tlsClientError', function(err, conn) { + this.addListener('tlsClientError', function addListener(err, conn) { if (!this.emit('clientError', err, conn)) conn.destroy(err); }); @@ -43,7 +43,7 @@ exports.Server = Server; Server.prototype.setTimeout = http.Server.prototype.setTimeout; -exports.createServer = function(opts, requestListener) { +exports.createServer = function createServer(opts, requestListener) { return new Server(opts, requestListener); }; @@ -112,7 +112,7 @@ function Agent(options) { inherits(Agent, http.Agent); Agent.prototype.createConnection = createConnection; -Agent.prototype.getName = function(options) { +Agent.prototype.getName = function getName(options) { var name = http.Agent.prototype.getName.call(this, options); name += ':'; @@ -186,7 +186,7 @@ const globalAgent = new Agent(); exports.globalAgent = globalAgent; exports.Agent = Agent; -exports.request = function(options, cb) { +exports.request = function request(options, cb) { if (typeof options === 'string') { options = url.parse(options); if (!options.hostname) { @@ -199,7 +199,7 @@ exports.request = function(options, cb) { return http.request(options, cb); }; -exports.get = function(options, cb) { +exports.get = function get(options, cb) { var req = exports.request(options, cb); req.end(); return req; |