| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f7c4796 commit 36e080c
105 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ rules: | |||
| 5 | 5 | comma-dangle: [error, { | |
| 6 | 6 | arrays: always-multiline, | |
| 7 | 7 | exports: always-multiline, | |
| 8 | - functions: only-multiline, | ||
| 8 | + functions: always-multiline, | ||
| 9 | 9 | imports: always-multiline, | |
| 10 | 10 | objects: only-multiline, | |
| 11 | 11 | }] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -395,7 +395,7 @@ function installListeners(agent, s, options) { | |||
| 395 | 395 | // TODO(ronag): Always destroy, even if not in free list. | |
| 396 | 396 | const sockets = agent.freeSockets; | |
| 397 | 397 | if (ArrayPrototypeSome(ObjectKeys(sockets), (name) => | |
| 398 | - ArrayPrototypeIncludes(sockets[name], s) | ||
| 398 | + ArrayPrototypeIncludes(sockets[name], s), | ||
| 399 | 399 | )) { | |
| 400 | 400 | return s.destroy(); | |
| 401 | 401 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -604,7 +604,7 @@ function checkConnections() { | |||
| 604 | 604 | ||
| 605 | 605 | function connectionListener(socket) { | |
| 606 | 606 | defaultTriggerAsyncIdScope( | |
| 607 | - getOrSetAsyncId(socket), connectionListenerInternal, this, socket | ||
| 607 | + getOrSetAsyncId(socket), connectionListenerInternal, this, socket, | ||
| 608 | 608 | ); | |
| 609 | 609 | } | |
| 610 | 610 | ||
@@ -807,15 +807,15 @@ function onParserTimeout(server, socket) { | |||
| 807 | 807 | const noop = () => {}; | |
| 808 | 808 | const badRequestResponse = Buffer.from( | |
| 809 | 809 | `HTTP/1.1 400 ${STATUS_CODES[400]}\r\n` + | |
| 810 | - 'Connection: close\r\n\r\n', 'ascii' | ||
| 810 | + 'Connection: close\r\n\r\n', 'ascii', | ||
| 811 | 811 | ); | |
| 812 | 812 | const requestTimeoutResponse = Buffer.from( | |
| 813 | 813 | `HTTP/1.1 408 ${STATUS_CODES[408]}\r\n` + | |
| 814 | - 'Connection: close\r\n\r\n', 'ascii' | ||
| 814 | + 'Connection: close\r\n\r\n', 'ascii', | ||
| 815 | 815 | ); | |
| 816 | 816 | const requestHeaderFieldsTooLargeResponse = Buffer.from( | |
| 817 | 817 | `HTTP/1.1 431 ${STATUS_CODES[431]}\r\n` + | |
| 818 | - 'Connection: close\r\n\r\n', 'ascii' | ||
| 818 | + 'Connection: close\r\n\r\n', 'ascii', | ||
| 819 | 819 | ); | |
| 820 | 820 | function socketOnError(e) { | |
| 821 | 821 | // Ignore further errors | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -171,7 +171,7 @@ function onhandshakedone() { | |||
| 171 | 171 | function loadSession(hello) { | |
| 172 | 172 | debug('server onclienthello', | |
| 173 | 173 | 'sessionid.len', hello.sessionId.length, | |
| 174 | - 'ticket?', hello.tlsTicket | ||
| 174 | + 'ticket?', hello.tlsTicket, | ||
| 175 | 175 | ); | |
| 176 | 176 | const owner = this[owner_symbol]; | |
| 177 | 177 | ||
@@ -350,7 +350,7 @@ function onPskServerCallback(identity, maxPskLen) { | |||
| 350 | 350 | throw new ERR_INVALID_ARG_TYPE( | |
| 351 | 351 | 'ret', | |
| 352 | 352 | ['Object', 'Buffer', 'TypedArray', 'DataView'], | |
| 353 | - ret | ||
| 353 | + ret, | ||
| 354 | 354 | ); | |
| 355 | 355 | } | |
| 356 | 356 | psk = ret.psk; | |
@@ -361,7 +361,7 @@ function onPskServerCallback(identity, maxPskLen) { | |||
| 361 | 361 | throw new ERR_INVALID_ARG_VALUE( | |
| 362 | 362 | 'psk', | |
| 363 | 363 | psk, | |
| 364 | - `Pre-shared key exceeds ${maxPskLen} bytes` | ||
| 364 | + `Pre-shared key exceeds ${maxPskLen} bytes`, | ||
| 365 | 365 | ); | |
| 366 | 366 | } | |
| 367 | 367 | ||
@@ -381,7 +381,7 @@ function onPskClientCallback(hint, maxPskLen, maxIdentityLen) { | |||
| 381 | 381 | throw new ERR_INVALID_ARG_VALUE( | |
| 382 | 382 | 'psk', | |
| 383 | 383 | ret.psk, | |
| 384 | - `Pre-shared key exceeds ${maxPskLen} bytes` | ||
| 384 | + `Pre-shared key exceeds ${maxPskLen} bytes`, | ||
| 385 | 385 | ); | |
| 386 | 386 | } | |
| 387 | 387 | ||
@@ -390,7 +390,7 @@ function onPskClientCallback(hint, maxPskLen, maxIdentityLen) { | |||
| 390 | 390 | throw new ERR_INVALID_ARG_VALUE( | |
| 391 | 391 | 'identity', | |
| 392 | 392 | ret.identity, | |
| 393 | - `PSK identity exceeds ${maxIdentityLen} bytes` | ||
| 393 | + `PSK identity exceeds ${maxIdentityLen} bytes`, | ||
| 394 | 394 | ); | |
| 395 | 395 | } | |
| 396 | 396 | ||
@@ -447,7 +447,7 @@ function initRead(tlsSocket, socket) { | |||
| 447 | 447 | debug('%s initRead', | |
| 448 | 448 | tlsSocket._tlsOptions.isServer ? 'server' : 'client', | |
| 449 | 449 | 'handle?', !!tlsSocket._handle, | |
| 450 | - 'buffered?', !!socket && socket.readableLength | ||
| 450 | + 'buffered?', !!socket && socket.readableLength, | ||
| 451 | 451 | ); | |
| 452 | 452 | // If we were destroyed already don't bother reading | |
| 453 | 453 | if (!tlsSocket._handle) | |
@@ -689,7 +689,7 @@ TLSSocket.prototype._init = function(socket, wrap) { | |||
| 689 | 689 | ||
| 690 | 690 | debug('%s _init', | |
| 691 | 691 | options.isServer ? 'server' : 'client', | |
| 692 | - 'handle?', !!ssl | ||
| 692 | + 'handle?', !!ssl, | ||
| 693 | 693 | ); | |
| 694 | 694 | ||
| 695 | 695 | // Clients (!isServer) always request a cert, servers request a client cert | |
@@ -846,7 +846,7 @@ TLSSocket.prototype.renegotiate = function(options, callback) { | |||
| 846 | 846 | ||
| 847 | 847 | debug('%s renegotiate()', | |
| 848 | 848 | this._tlsOptions.isServer ? 'server' : 'client', | |
| 849 | - 'destroyed?', this.destroyed | ||
| 849 | + 'destroyed?', this.destroyed, | ||
| 850 | 850 | ); | |
| 851 | 851 | ||
| 852 | 852 | if (this.destroyed) | |
@@ -1456,7 +1456,7 @@ Server.prototype.addContext = function(servername, context) { | |||
| 1456 | 1456 | ||
| 1457 | 1457 | const re = new RegExp('^' + StringPrototypeReplaceAll( | |
| 1458 | 1458 | RegExpPrototypeSymbolReplace(/([.^$+?\-\\[\]{}])/g, servername, '\\$1'), | |
| 1459 | - '*', '[^.]*' | ||
| 1459 | + '*', '[^.]*', | ||
| 1460 | 1460 | ) + '$'); | |
| 1461 | 1461 | ArrayPrototypePush(this._contexts, | |
| 1462 | 1462 | [re, tls.createSecureContext(context).context]); | |
@@ -1680,7 +1680,7 @@ exports.connect = function connect(...args) { | |||
| 1680 | 1680 | 'Setting the TLS ServerName to an IP address is not permitted by ' + | |
| 1681 | 1681 | 'RFC 6066. This will be ignored in a future version.', | |
| 1682 | 1682 | 'DeprecationWarning', | |
| 1683 | - 'DEP0123' | ||
| 1683 | + 'DEP0123', | ||
| 1684 | 1684 | ); | |
| 1685 | 1685 | ipServernameWarned = true; | |
| 1686 | 1686 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -148,7 +148,7 @@ function fail(actual, expected, message, operator, stackStartFn) { | |||
| 148 | 148 | 'assert.fail() with more than one argument is deprecated. ' + | |
| 149 | 149 | 'Please use assert.strictEqual() instead or only pass a message.', | |
| 150 | 150 | 'DeprecationWarning', | |
| 151 | - 'DEP0094' | ||
| 151 | + 'DEP0094', | ||
| 152 | 152 | ); | |
| 153 | 153 | } | |
| 154 | 154 | if (argsLen === 2) | |
@@ -807,13 +807,13 @@ function expectsError(stackStartFn, actual, error, message) { | |||
| 807 | 807 | if (actual.message === error) { | |
| 808 | 808 | throw new ERR_AMBIGUOUS_ARGUMENT( | |
| 809 | 809 | 'error/message', | |
| 810 | - `The error message "${actual.message}" is identical to the message.` | ||
| 810 | + `The error message "${actual.message}" is identical to the message.`, | ||
| 811 | 811 | ); | |
| 812 | 812 | } | |
| 813 | 813 | } else if (actual === error) { | |
| 814 | 814 | throw new ERR_AMBIGUOUS_ARGUMENT( | |
| 815 | 815 | 'error/message', | |
| 816 | - `The error "${actual}" is identical to the message.` | ||
| 816 | + `The error "${actual}" is identical to the message.`, | ||
| 817 | 817 | ); | |
| 818 | 818 | } | |
| 819 | 819 | message = error; | |
@@ -855,7 +855,7 @@ function hasMatchingError(actual, expected) { | |||
| 855 | 855 | return RegExpPrototypeExec(expected, str) !== null; | |
| 856 | 856 | } | |
| 857 | 857 | throw new ERR_INVALID_ARG_TYPE( | |
| 858 | - 'expected', ['Function', 'RegExp'], expected | ||
| 858 | + 'expected', ['Function', 'RegExp'], expected, | ||
| 859 | 859 | ); | |
| 860 | 860 | } | |
| 861 | 861 | // Guard instanceof against arrow functions as they don't have a prototype. | |
@@ -970,7 +970,7 @@ assert.ifError = function ifError(err) { | |||
| 970 | 970 | if (origStackStart !== -1) { | |
| 971 | 971 | const originalFrames = StringPrototypeSplit( | |
| 972 | 972 | StringPrototypeSlice(origStack, origStackStart + 1), | |
| 973 | - '\n' | ||
| 973 | + '\n', | ||
| 974 | 974 | ); | |
| 975 | 975 | // Filter all frames existing in err.stack. | |
| 976 | 976 | let newFrames = StringPrototypeSplit(newErr.stack, '\n'); | |
@@ -996,7 +996,7 @@ assert.ifError = function ifError(err) { | |||
| 996 | 996 | function internalMatch(string, regexp, message, fn) { | |
| 997 | 997 | if (!isRegExp(regexp)) { | |
| 998 | 998 | throw new ERR_INVALID_ARG_TYPE( | |
| 999 | - 'regexp', 'RegExp', regexp | ||
| 999 | + 'regexp', 'RegExp', regexp, | ||
| 1000 | 1000 | ); | |
| 1001 | 1001 | } | |
| 1002 | 1002 | const match = fn === assert.match; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -335,7 +335,7 @@ Buffer.from = function from(value, encodingOrOffset, length) { | |||
| 335 | 335 | throw new ERR_INVALID_ARG_TYPE( | |
| 336 | 336 | 'first argument', | |
| 337 | 337 | ['string', 'Buffer', 'ArrayBuffer', 'Array', 'Array-like Object'], | |
| 338 | - value | ||
| 338 | + value, | ||
| 339 | 339 | ); | |
| 340 | 340 | }; | |
| 341 | 341 | ||
@@ -745,7 +745,7 @@ function byteLength(string, encoding) { | |||
| 745 | 745 | } | |
| 746 | 746 | ||
| 747 | 747 | throw new ERR_INVALID_ARG_TYPE( | |
| 748 | - 'string', ['string', 'Buffer', 'ArrayBuffer'], string | ||
| 748 | + 'string', ['string', 'Buffer', 'ArrayBuffer'], string, | ||
| 749 | 749 | ); | |
| 750 | 750 | } | |
| 751 | 751 | ||
@@ -966,7 +966,7 @@ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { | |||
| 966 | 966 | } | |
| 967 | 967 | ||
| 968 | 968 | throw new ERR_INVALID_ARG_TYPE( | |
| 969 | - 'value', ['number', 'string', 'Buffer', 'Uint8Array'], val | ||
| 969 | + 'value', ['number', 'string', 'Buffer', 'Uint8Array'], val, | ||
| 970 | 970 | ); | |
| 971 | 971 | } | |
| 972 | 972 | ||
@@ -1222,7 +1222,7 @@ if (internalBinding('config').hasIntl) { | |||
| 1222 | 1222 | const code = icuErrName(result); | |
| 1223 | 1223 | const err = genericNodeError( | |
| 1224 | 1224 | `Unable to transcode Buffer [${code}]`, | |
| 1225 | - { code: code, errno: result } | ||
| 1225 | + { code: code, errno: result }, | ||
| 1226 | 1226 | ); | |
| 1227 | 1227 | throw err; | |
| 1228 | 1228 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,7 +56,7 @@ let debug = require('internal/util/debuglog').debuglog( | |||
| 56 | 56 | 'child_process', | |
| 57 | 57 | (fn) => { | |
| 58 | 58 | debug = fn; | |
| 59 | - } | ||
| 59 | + }, | ||
| 60 | 60 | ); | |
| 61 | 61 | const { Buffer } = require('buffer'); | |
| 62 | 62 | const { Pipe, constants: PipeConstants } = internalBinding('pipe_wrap'); | |
@@ -686,7 +686,7 @@ function normalizeSpawnArguments(file, args, options) { | |||
| 686 | 686 | } | |
| 687 | 687 | sawKey.add(uppercaseKey); | |
| 688 | 688 | return true; | |
| 689 | - } | ||
| 689 | + }, | ||
| 690 | 690 | ); | |
| 691 | 691 | } | |
| 692 | 692 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -307,7 +307,7 @@ function getRandomBytesAlias(key) { | |||
| 307 | 307 | configurable: true, | |
| 308 | 308 | writable: true, | |
| 309 | 309 | value: value | |
| 310 | - } | ||
| 310 | + }, | ||
| 311 | 311 | ); | |
| 312 | 312 | return value; | |
| 313 | 313 | }, | |
@@ -321,7 +321,7 @@ function getRandomBytesAlias(key) { | |||
| 321 | 321 | configurable: true, | |
| 322 | 322 | writable: true, | |
| 323 | 323 | value | |
| 324 | - } | ||
| 324 | + }, | ||
| 325 | 325 | ); | |
| 326 | 326 | } | |
| 327 | 327 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -412,7 +412,7 @@ function _connect(port, address, callback) { | |||
| 412 | 412 | defaultTriggerAsyncIdScope( | |
| 413 | 413 | this[async_id_symbol], | |
| 414 | 414 | doConnect, | |
| 415 | - ex, this, ip, address, port, callback | ||
| 415 | + ex, this, ip, address, port, callback, | ||
| 416 | 416 | ); | |
| 417 | 417 | }; | |
| 418 | 418 | ||
@@ -662,7 +662,7 @@ Socket.prototype.send = function(buffer, | |||
| 662 | 662 | defaultTriggerAsyncIdScope( | |
| 663 | 663 | this[async_id_symbol], | |
| 664 | 664 | doSend, | |
| 665 | - ex, this, ip, list, address, port, callback | ||
| 665 | + ex, this, ip, list, address, port, callback, | ||
| 666 | 666 | ); | |
| 667 | 667 | }; | |
| 668 | 668 | ||
@@ -1066,7 +1066,7 @@ module.exports = { | |||
| 1066 | 1066 | _createSocketHandle: deprecate( | |
| 1067 | 1067 | _createSocketHandle, | |
| 1068 | 1068 | 'dgram._createSocketHandle() is deprecated', | |
| 1069 | - 'DEP0112' | ||
| 1069 | + 'DEP0112', | ||
| 1070 | 1070 | ), | |
| 1071 | 1071 | createSocket, | |
| 1072 | 1072 | Socket | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -219,7 +219,7 @@ function lookup(hostname, options, callback) { | |||
| 219 | 219 | req.oncomplete = all ? onlookupall : onlookup; | |
| 220 | 220 | ||
| 221 | 221 | const err = cares.getaddrinfo( | |
| 222 | - req, toASCII(hostname), family, hints, verbatim | ||
| 222 | + req, toASCII(hostname), family, hints, verbatim, | ||
| 223 | 223 | ); | |
| 224 | 224 | if (err) { | |
| 225 | 225 | process.nextTick(callback, dnsException(err, 'getaddrinfo', hostname)); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments