GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: enforce use of trailing commas for functions · nodejs/node@36e080c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • .eslintrc.yaml
    • _http_agent.js
    • _http_server.js
    • _tls_wrap.js
    • assert.js
    • buffer.js
    • child_process.js
    • crypto.js
    • dgram.js
    • dns.js
    • fs.js
    • internal
      • assert
        • assertion_error.js
      • async_hooks.js
      • bootstrap
        • loaders.js
        • node.js
      • child_process.js
      • child_process
        • serialization.js
      • cluster
        • worker.js
      • console
        • constructor.js
      • crypto
        • diffiehellman.js
        • keys.js
        • random.js
        • sig.js
        • util.js
      • debugger
        • inspect.js
        • inspect_client.js
        • inspect_repl.js
      • dns
        • utils.js
      • errors.js
      • event_target.js
      • freeze_intrinsics.js
      • fs
        • dir.js
        • promises.js
        • streams.js
        • utils.js
      • http2
        • compat.js
        • core.js
        • util.js
      • js_stream_socket.js
      • main
        • mksnapshot.js
        • print_help.js
        • worker_thread.js
      • mime.js
      • modules
        • cjs
          • helpers.js
          • loader.js
        • esm
          • fetch_module.js
          • formats.js
          • get_format.js
          • initialize_import_meta.js
          • loader.js
          • module_job.js
          • package_config.js
          • resolve.js
          • translators.js
        • package_json_reader.js
      • per_context
        • primordials.js
      • perf
        • observe.js
      • policy
        • manifest.js
      • process
        • esm_loader.js
        • per_thread.js
        • promises.js
        • task_queues.js
      • readline
        • interface.js
        • utils.js
      • repl
        • await.js
        • history.js
        • utils.js
      • source_map
        • prepare_stack_trace.js
        • source_map.js
      • streams
        • compose.js
        • duplexify.js
        • end-of-stream.js
        • operators.js
        • readable.js
      • test_runner
        • coverage.js
        • mock.js
        • reporter
          • tap.js
        • tap_checker.js
        • tap_lexer.js
        • tap_parser.js
        • test.js
        • utils.js
      • tls
        • secure-context.js
      • tty.js
      • url.js
      • util
        • comparisons.js
        • inspect.js
        • inspector.js
        • parse_args
          • parse_args.js
          • utils.js
      • validators.js
      • vm.js
      • vm
        • module.js
      • webstreams
        • adapters.js
        • queuingstrategies.js
        • readablestream.js
        • util.js
      • worker.js
    • net.js
    • repl.js
    • tls.js
    • trace_events.js
    • vm.js
    • wasi.js
    • zlib.js

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: lib/.eslintrc.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ rules:
55
comma-dangle: [error, {
66
arrays: always-multiline,
77
exports: always-multiline,
8-
functions: only-multiline,
8+
functions: always-multiline,
99
imports: always-multiline,
1010
objects: only-multiline,
1111
}]
Collapse file

‎lib/_http_agent.js‎

Copy file name to clipboardExpand all lines: lib/_http_agent.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ function installListeners(agent, s, options) {
395395
// TODO(ronag): Always destroy, even if not in free list.
396396
const sockets = agent.freeSockets;
397397
if (ArrayPrototypeSome(ObjectKeys(sockets), (name) =>
398-
ArrayPrototypeIncludes(sockets[name], s)
398+
ArrayPrototypeIncludes(sockets[name], s),
399399
)) {
400400
return s.destroy();
401401
}
Collapse file

‎lib/_http_server.js‎

Copy file name to clipboardExpand all lines: lib/_http_server.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ function checkConnections() {
604604

605605
function connectionListener(socket) {
606606
defaultTriggerAsyncIdScope(
607-
getOrSetAsyncId(socket), connectionListenerInternal, this, socket
607+
getOrSetAsyncId(socket), connectionListenerInternal, this, socket,
608608
);
609609
}
610610

@@ -807,15 +807,15 @@ function onParserTimeout(server, socket) {
807807
const noop = () => {};
808808
const badRequestResponse = Buffer.from(
809809
`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',
811811
);
812812
const requestTimeoutResponse = Buffer.from(
813813
`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',
815815
);
816816
const requestHeaderFieldsTooLargeResponse = Buffer.from(
817817
`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',
819819
);
820820
function socketOnError(e) {
821821
// Ignore further errors
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function onhandshakedone() {
171171
function loadSession(hello) {
172172
debug('server onclienthello',
173173
'sessionid.len', hello.sessionId.length,
174-
'ticket?', hello.tlsTicket
174+
'ticket?', hello.tlsTicket,
175175
);
176176
const owner = this[owner_symbol];
177177

@@ -350,7 +350,7 @@ function onPskServerCallback(identity, maxPskLen) {
350350
throw new ERR_INVALID_ARG_TYPE(
351351
'ret',
352352
['Object', 'Buffer', 'TypedArray', 'DataView'],
353-
ret
353+
ret,
354354
);
355355
}
356356
psk = ret.psk;
@@ -361,7 +361,7 @@ function onPskServerCallback(identity, maxPskLen) {
361361
throw new ERR_INVALID_ARG_VALUE(
362362
'psk',
363363
psk,
364-
`Pre-shared key exceeds ${maxPskLen} bytes`
364+
`Pre-shared key exceeds ${maxPskLen} bytes`,
365365
);
366366
}
367367

@@ -381,7 +381,7 @@ function onPskClientCallback(hint, maxPskLen, maxIdentityLen) {
381381
throw new ERR_INVALID_ARG_VALUE(
382382
'psk',
383383
ret.psk,
384-
`Pre-shared key exceeds ${maxPskLen} bytes`
384+
`Pre-shared key exceeds ${maxPskLen} bytes`,
385385
);
386386
}
387387

@@ -390,7 +390,7 @@ function onPskClientCallback(hint, maxPskLen, maxIdentityLen) {
390390
throw new ERR_INVALID_ARG_VALUE(
391391
'identity',
392392
ret.identity,
393-
`PSK identity exceeds ${maxIdentityLen} bytes`
393+
`PSK identity exceeds ${maxIdentityLen} bytes`,
394394
);
395395
}
396396

@@ -447,7 +447,7 @@ function initRead(tlsSocket, socket) {
447447
debug('%s initRead',
448448
tlsSocket._tlsOptions.isServer ? 'server' : 'client',
449449
'handle?', !!tlsSocket._handle,
450-
'buffered?', !!socket && socket.readableLength
450+
'buffered?', !!socket && socket.readableLength,
451451
);
452452
// If we were destroyed already don't bother reading
453453
if (!tlsSocket._handle)
@@ -689,7 +689,7 @@ TLSSocket.prototype._init = function(socket, wrap) {
689689

690690
debug('%s _init',
691691
options.isServer ? 'server' : 'client',
692-
'handle?', !!ssl
692+
'handle?', !!ssl,
693693
);
694694

695695
// Clients (!isServer) always request a cert, servers request a client cert
@@ -846,7 +846,7 @@ TLSSocket.prototype.renegotiate = function(options, callback) {
846846

847847
debug('%s renegotiate()',
848848
this._tlsOptions.isServer ? 'server' : 'client',
849-
'destroyed?', this.destroyed
849+
'destroyed?', this.destroyed,
850850
);
851851

852852
if (this.destroyed)
@@ -1456,7 +1456,7 @@ Server.prototype.addContext = function(servername, context) {
14561456

14571457
const re = new RegExp('^' + StringPrototypeReplaceAll(
14581458
RegExpPrototypeSymbolReplace(/([.^$+?\-\\[\]{}])/g, servername, '\\$1'),
1459-
'*', '[^.]*'
1459+
'*', '[^.]*',
14601460
) + '$');
14611461
ArrayPrototypePush(this._contexts,
14621462
[re, tls.createSecureContext(context).context]);
@@ -1680,7 +1680,7 @@ exports.connect = function connect(...args) {
16801680
'Setting the TLS ServerName to an IP address is not permitted by ' +
16811681
'RFC 6066. This will be ignored in a future version.',
16821682
'DeprecationWarning',
1683-
'DEP0123'
1683+
'DEP0123',
16841684
);
16851685
ipServernameWarned = true;
16861686
}
Collapse file

‎lib/assert.js‎

Copy file name to clipboardExpand all lines: lib/assert.js
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function fail(actual, expected, message, operator, stackStartFn) {
148148
'assert.fail() with more than one argument is deprecated. ' +
149149
'Please use assert.strictEqual() instead or only pass a message.',
150150
'DeprecationWarning',
151-
'DEP0094'
151+
'DEP0094',
152152
);
153153
}
154154
if (argsLen === 2)
@@ -807,13 +807,13 @@ function expectsError(stackStartFn, actual, error, message) {
807807
if (actual.message === error) {
808808
throw new ERR_AMBIGUOUS_ARGUMENT(
809809
'error/message',
810-
`The error message "${actual.message}" is identical to the message.`
810+
`The error message "${actual.message}" is identical to the message.`,
811811
);
812812
}
813813
} else if (actual === error) {
814814
throw new ERR_AMBIGUOUS_ARGUMENT(
815815
'error/message',
816-
`The error "${actual}" is identical to the message.`
816+
`The error "${actual}" is identical to the message.`,
817817
);
818818
}
819819
message = error;
@@ -855,7 +855,7 @@ function hasMatchingError(actual, expected) {
855855
return RegExpPrototypeExec(expected, str) !== null;
856856
}
857857
throw new ERR_INVALID_ARG_TYPE(
858-
'expected', ['Function', 'RegExp'], expected
858+
'expected', ['Function', 'RegExp'], expected,
859859
);
860860
}
861861
// Guard instanceof against arrow functions as they don't have a prototype.
@@ -970,7 +970,7 @@ assert.ifError = function ifError(err) {
970970
if (origStackStart !== -1) {
971971
const originalFrames = StringPrototypeSplit(
972972
StringPrototypeSlice(origStack, origStackStart + 1),
973-
'\n'
973+
'\n',
974974
);
975975
// Filter all frames existing in err.stack.
976976
let newFrames = StringPrototypeSplit(newErr.stack, '\n');
@@ -996,7 +996,7 @@ assert.ifError = function ifError(err) {
996996
function internalMatch(string, regexp, message, fn) {
997997
if (!isRegExp(regexp)) {
998998
throw new ERR_INVALID_ARG_TYPE(
999-
'regexp', 'RegExp', regexp
999+
'regexp', 'RegExp', regexp,
10001000
);
10011001
}
10021002
const match = fn === assert.match;
Collapse file

‎lib/buffer.js‎

Copy file name to clipboardExpand all lines: lib/buffer.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ Buffer.from = function from(value, encodingOrOffset, length) {
335335
throw new ERR_INVALID_ARG_TYPE(
336336
'first argument',
337337
['string', 'Buffer', 'ArrayBuffer', 'Array', 'Array-like Object'],
338-
value
338+
value,
339339
);
340340
};
341341

@@ -745,7 +745,7 @@ function byteLength(string, encoding) {
745745
}
746746

747747
throw new ERR_INVALID_ARG_TYPE(
748-
'string', ['string', 'Buffer', 'ArrayBuffer'], string
748+
'string', ['string', 'Buffer', 'ArrayBuffer'], string,
749749
);
750750
}
751751

@@ -966,7 +966,7 @@ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
966966
}
967967

968968
throw new ERR_INVALID_ARG_TYPE(
969-
'value', ['number', 'string', 'Buffer', 'Uint8Array'], val
969+
'value', ['number', 'string', 'Buffer', 'Uint8Array'], val,
970970
);
971971
}
972972

@@ -1222,7 +1222,7 @@ if (internalBinding('config').hasIntl) {
12221222
const code = icuErrName(result);
12231223
const err = genericNodeError(
12241224
`Unable to transcode Buffer [${code}]`,
1225-
{ code: code, errno: result }
1225+
{ code: code, errno: result },
12261226
);
12271227
throw err;
12281228
};
Collapse file

‎lib/child_process.js‎

Copy file name to clipboardExpand all lines: lib/child_process.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ let debug = require('internal/util/debuglog').debuglog(
5656
'child_process',
5757
(fn) => {
5858
debug = fn;
59-
}
59+
},
6060
);
6161
const { Buffer } = require('buffer');
6262
const { Pipe, constants: PipeConstants } = internalBinding('pipe_wrap');
@@ -686,7 +686,7 @@ function normalizeSpawnArguments(file, args, options) {
686686
}
687687
sawKey.add(uppercaseKey);
688688
return true;
689-
}
689+
},
690690
);
691691
}
692692

Collapse file

‎lib/crypto.js‎

Copy file name to clipboardExpand all lines: lib/crypto.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ function getRandomBytesAlias(key) {
307307
configurable: true,
308308
writable: true,
309309
value: value
310-
}
310+
},
311311
);
312312
return value;
313313
},
@@ -321,7 +321,7 @@ function getRandomBytesAlias(key) {
321321
configurable: true,
322322
writable: true,
323323
value
324-
}
324+
},
325325
);
326326
}
327327
};
Collapse file

‎lib/dgram.js‎

Copy file name to clipboardExpand all lines: lib/dgram.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ function _connect(port, address, callback) {
412412
defaultTriggerAsyncIdScope(
413413
this[async_id_symbol],
414414
doConnect,
415-
ex, this, ip, address, port, callback
415+
ex, this, ip, address, port, callback,
416416
);
417417
};
418418

@@ -662,7 +662,7 @@ Socket.prototype.send = function(buffer,
662662
defaultTriggerAsyncIdScope(
663663
this[async_id_symbol],
664664
doSend,
665-
ex, this, ip, list, address, port, callback
665+
ex, this, ip, list, address, port, callback,
666666
);
667667
};
668668

@@ -1066,7 +1066,7 @@ module.exports = {
10661066
_createSocketHandle: deprecate(
10671067
_createSocketHandle,
10681068
'dgram._createSocketHandle() is deprecated',
1069-
'DEP0112'
1069+
'DEP0112',
10701070
),
10711071
createSocket,
10721072
Socket
Collapse file

‎lib/dns.js‎

Copy file name to clipboardExpand all lines: lib/dns.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function lookup(hostname, options, callback) {
219219
req.oncomplete = all ? onlookupall : onlookup;
220220

221221
const err = cares.getaddrinfo(
222-
req, toASCII(hostname), family, hints, verbatim
222+
req, toASCII(hostname), family, hints, verbatim,
223223
);
224224
if (err) {
225225
process.nextTick(callback, dnsException(err, 'getaddrinfo', hostname));

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.