Skip to content

Commit c474f88

Browse files
BridgeARsilverwind
authored andcommitted
lib: fix typos
PR-URL: #13741 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Roman Reiss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 8789904 commit c474f88

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed

lib/_tls_wrap.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ TLSSocket.prototype._init = function(socket, wrap) {
420420

421421
// lib/net.js expect this value to be non-zero if write hasn't been flushed
422422
// immediately
423-
// TODO(indutny): rewise this solution, it might be 1 before handshake and
423+
// TODO(indutny): revise this solution, it might be 1 before handshake and
424424
// represent real writeQueueSize during regular writes.
425425
ssl.writeQueueSize = 1;
426426

@@ -723,7 +723,7 @@ TLSSocket.prototype.getProtocol = function() {
723723
// outcomes:
724724
//
725725
// A) verifyError returns null meaning the client's certificate is signed
726-
// by one of the server's CAs. The server know's the client idenity now
726+
// by one of the server's CAs. The server now knows the client's identity
727727
// and the client is authorized.
728728
//
729729
// B) For some reason the client's certificate is not acceptable -
@@ -993,7 +993,7 @@ function normalizeConnectArgs(listArgs) {
993993
var cb = args[1];
994994

995995
// If args[0] was options, then normalize dealt with it.
996-
// If args[0] is port, or args[0], args[1] is host,port, we need to
996+
// If args[0] is port, or args[0], args[1] is host, port, we need to
997997
// find the options and merge them in, normalize's options has only
998998
// the host/port/path args that it knows about, not the tls options.
999999
// This means that options.host overrides a host arg.

lib/buffer.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function showFlaggedDeprecation() {
120120
if (bufferWarn) {
121121
// This is a *pending* deprecation warning. It is not emitted by
122122
// default unless the --pending-deprecation command-line flag is
123-
// used or the NODE_PENDING_DEPRECATION=1 envvar is set.
123+
// used or the NODE_PENDING_DEPRECATION=1 env var is set.
124124
process.emitWarning(bufferWarning, 'DeprecationWarning', 'DEP0005');
125125
bufferWarn = false;
126126
}
@@ -132,7 +132,7 @@ const doFlaggedDeprecation =
132132
function() {};
133133

134134
/**
135-
* The Buffer() construtor is deprecated in documentation and should not be
135+
* The Buffer() constructor is deprecated in documentation and should not be
136136
* used moving forward. Rather, developers should use one of the three new
137137
* factory APIs: Buffer.from(), Buffer.allocUnsafe() or Buffer.alloc() based on
138138
* their specific needs. There is no runtime deprecation because of the extent
@@ -217,7 +217,7 @@ Buffer.alloc = function(size, fill, encoding) {
217217
// Since we are filling anyway, don't zero fill initially.
218218
// Only pay attention to encoding if it's a string. This
219219
// prevents accidentally sending in a number that would
220-
// be interpretted as a start offset.
220+
// be interpreted as a start offset.
221221
if (typeof encoding !== 'string')
222222
encoding = undefined;
223223
return createUnsafeBuffer(size).fill(fill, encoding);

lib/fs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,7 @@ fs.realpathSync = function realpathSync(p, options) {
16201620
knownHard[base] = true;
16211621
}
16221622

1623-
// walk down the path, swapping out linked pathparts for their real
1623+
// walk down the path, swapping out linked path parts for their real
16241624
// values
16251625
// NB: p.length changes.
16261626
while (pos < p.length) {
@@ -1747,7 +1747,7 @@ fs.realpath = function realpath(p, options, callback) {
17471747
process.nextTick(LOOP);
17481748
}
17491749

1750-
// walk down the path, swapping out linked pathparts for their real
1750+
// walk down the path, swapping out linked path parts for their real
17511751
// values
17521752
function LOOP() {
17531753
// stop if scanned past end of path

lib/internal/socket_list.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const EventEmitter = require('events');
44

5-
// This object keep track of the socket there are sended
5+
// This object keeps track of the sockets that are sent
66
class SocketListSend extends EventEmitter {
77
constructor(child, key) {
88
super();
@@ -52,7 +52,7 @@ class SocketListSend extends EventEmitter {
5252
}
5353

5454

55-
// This object keep track of the socket there are received
55+
// This object keeps track of the sockets that are received
5656
class SocketListReceive extends EventEmitter {
5757
constructor(child, key) {
5858
super();
@@ -93,7 +93,7 @@ class SocketListReceive extends EventEmitter {
9393
add(obj) {
9494
this.connections++;
9595

96-
// Notify previous owner of socket about its state change
96+
// Notify the previous owner of the socket about its state change
9797
obj.socket.once('close', () => {
9898
this.connections--;
9999

lib/repl.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function REPLServer(prompt,
138138

139139
if (breakEvalOnSigint && eval_) {
140140
// Allowing this would not reflect user expectations.
141-
// breakEvalOnSigint affects only the behaviour of the default eval().
141+
// breakEvalOnSigint affects only the behavior of the default eval().
142142
throw new errors.Error('ERR_INVALID_REPL_EVAL_CONFIG');
143143
}
144144

@@ -711,7 +711,7 @@ REPLServer.prototype.complete = function() {
711711
function complete(line, callback) {
712712
// There may be local variables to evaluate, try a nested REPL
713713
if (this.bufferedCommand !== undefined && this.bufferedCommand.length) {
714-
// Get a new array of inputed lines
714+
// Get a new array of inputted lines
715715
var tmp = this.lines.slice();
716716
// Kill off all function declarations to push all local variables into
717717
// global scope

lib/timers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ exports.setTimeout = setTimeout;
467467
function createSingleTimeout(callback, after, args) {
468468
after *= 1; // coalesce to number or NaN
469469
if (!(after >= 1 && after <= TIMEOUT_MAX))
470-
after = 1; // schedule on next tick, follows browser behaviour
470+
after = 1; // schedule on next tick, follows browser behavior
471471

472472
var timer = new Timeout(after, callback, args);
473473
if (process.domain)
@@ -556,7 +556,7 @@ exports.setInterval = function(callback, repeat, arg1, arg2, arg3) {
556556
function createRepeatTimeout(callback, repeat, args) {
557557
repeat *= 1; // coalesce to number or NaN
558558
if (!(repeat >= 1 && repeat <= TIMEOUT_MAX))
559-
repeat = 1; // schedule on next tick, follows browser behaviour
559+
repeat = 1; // schedule on next tick, follows browser behavior
560560

561561
var timer = new Timeout(repeat, callback, args);
562562
timer._repeat = repeat;

lib/tls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const { isUint8Array } = process.binding('util');
3232

3333
// Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations
3434
// every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more
35-
// renegotations are seen. The settings are applied to all remote client
35+
// renegotiations are seen. The settings are applied to all remote client
3636
// connections.
3737
exports.CLIENT_RENEG_LIMIT = 3;
3838
exports.CLIENT_RENEG_WINDOW = 600;

lib/tty.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function WriteStream(fd) {
7777

7878
// Prevents interleaved or dropped stdout/stderr output for terminals.
7979
// As noted in the following reference, local TTYs tend to be quite fast and
80-
// this behaviour has become expected due historical functionality on OS X,
80+
// this behavior has become expected due historical functionality on OS X,
8181
// even though it was originally intended to change in v1.0.2 (Libuv 1.2.1).
8282
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
8383
this._handle.setBlocking(true);

lib/url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ function autoEscapeStr(rest) {
449449
var lastEscapedPos = 0;
450450
for (var i = 0; i < rest.length; ++i) {
451451
// Manual switching is faster than using a Map/Object.
452-
// `escaped` contains substring up to the last escaped cahracter.
452+
// `escaped` contains substring up to the last escaped character.
453453
switch (rest.charCodeAt(i)) {
454454
case 9: // '\t'
455455
// Concat if there are ordinary characters in the middle.

0 commit comments

Comments
 (0)