Skip to content

Commit 81edf59

Browse files
BridgeARMylesBorins
authored andcommitted
lib: fix typos
Original-PR-URL: #13741 Original-Reviewed-By: Colin Ihrig <[email protected]> Original-Reviewed-By: Roman Reiss <[email protected]> Original-Reviewed-By: James M Snell <[email protected]> Original-Reviewed-By: Luigi Pinca <[email protected]> Original-Reviewed-By: Gibson Fahnestock <[email protected]> PR-URL: #14044 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 51364b7 commit 81edf59

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

lib/_tls_wrap.js

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

403403
// lib/net.js expect this value to be non-zero if write hasn't been flushed
404404
// immediately
405-
// TODO(indutny): rewise this solution, it might be 1 before handshake and
405+
// TODO(indutny): revise this solution, it might be 1 before handshake and
406406
// represent real writeQueueSize during regular writes.
407407
ssl.writeQueueSize = 1;
408408

@@ -705,7 +705,7 @@ TLSSocket.prototype.getProtocol = function() {
705705
// outcomes:
706706
//
707707
// A) verifyError returns null meaning the client's certificate is signed
708-
// by one of the server's CAs. The server know's the client idenity now
708+
// by one of the server's CAs. The server now knows the client's identity
709709
// and the client is authorized.
710710
//
711711
// B) For some reason the client's certificate is not acceptable -
@@ -984,7 +984,7 @@ function normalizeConnectArgs(listArgs) {
984984
var cb = args[1];
985985

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

lib/buffer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function alignPool() {
5858
}
5959

6060
/**
61-
* The Buffer() construtor is "soft deprecated" ... that is, it is deprecated
61+
* The Buffer() constructor is "soft deprecated" ... that is, it is deprecated
6262
* in the documentation and should not be used moving forward. Rather,
6363
* developers should use one of the three new factory APIs: Buffer.from(),
6464
* Buffer.allocUnsafe() or Buffer.alloc() based on their specific needs. There
@@ -124,7 +124,7 @@ Buffer.alloc = function(size, fill, encoding) {
124124
// Since we are filling anyway, don't zero fill initially.
125125
// Only pay attention to encoding if it's a string. This
126126
// prevents accidentally sending in a number that would
127-
// be interpretted as a start offset.
127+
// be interpreted as a start offset.
128128
if (typeof encoding !== 'string')
129129
encoding = undefined;
130130
return createUnsafeBuffer(size).fill(fill, encoding);

lib/fs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ fs.realpathSync = function realpathSync(p, options) {
16511651
}
16521652
}
16531653

1654-
// walk down the path, swapping out linked pathparts for their real
1654+
// walk down the path, swapping out linked path parts for their real
16551655
// values
16561656
// NB: p.length changes.
16571657
while (pos < p.length) {
@@ -1765,7 +1765,7 @@ fs.realpath = function realpath(p, options, callback) {
17651765
}
17661766
}
17671767

1768-
// walk down the path, swapping out linked pathparts for their real
1768+
// walk down the path, swapping out linked path parts for their real
17691769
// values
17701770
function LOOP() {
17711771
// stop if scanned past end of path

lib/internal/socket_list.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = {SocketListSend, SocketListReceive};
55
const EventEmitter = require('events');
66
const util = require('util');
77

8-
// This object keep track of the socket there are sended
8+
// This object keeps track of the sockets that are sent
99
function SocketListSend(slave, key) {
1010
EventEmitter.call(this);
1111

@@ -54,7 +54,7 @@ SocketListSend.prototype.getConnections = function getConnections(callback) {
5454
});
5555
};
5656

57-
// This object keep track of the socket there are received
57+
// This object keeps track of the sockets there are received
5858
function SocketListReceive(slave, key) {
5959
EventEmitter.call(this);
6060

@@ -95,7 +95,7 @@ util.inherits(SocketListReceive, EventEmitter);
9595
SocketListReceive.prototype.add = function(obj) {
9696
this.connections++;
9797

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

lib/repl.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function REPLServer(prompt,
216216

217217
if (breakEvalOnSigint && eval_) {
218218
// Allowing this would not reflect user expectations.
219-
// breakEvalOnSigint affects only the behaviour of the default eval().
219+
// breakEvalOnSigint affects only the behavior of the default eval().
220220
throw new Error('Cannot specify both breakEvalOnSigint and eval for REPL');
221221
}
222222

@@ -817,7 +817,7 @@ REPLServer.prototype.complete = function() {
817817
function complete(line, callback) {
818818
// There may be local variables to evaluate, try a nested REPL
819819
if (this.bufferedCommand !== undefined && this.bufferedCommand.length) {
820-
// Get a new array of inputed lines
820+
// Get a new array of inputted lines
821821
var tmp = this.lines.slice();
822822
// Kill off all function declarations to push all local variables into
823823
// global scope

lib/timers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ exports.setTimeout = function(callback, after, arg1, arg2, arg3) {
367367
function createSingleTimeout(callback, after, args) {
368368
after *= 1; // coalesce to number or NaN
369369
if (!(after >= 1 && after <= TIMEOUT_MAX))
370-
after = 1; // schedule on next tick, follows browser behaviour
370+
after = 1; // schedule on next tick, follows browser behavior
371371

372372
var timer = new Timeout(after, callback, args);
373373
if (process.domain)
@@ -454,7 +454,7 @@ exports.setInterval = function(callback, repeat, arg1, arg2, arg3) {
454454
function createRepeatTimeout(callback, repeat, args) {
455455
repeat *= 1; // coalesce to number or NaN
456456
if (!(repeat >= 1 && repeat <= TIMEOUT_MAX))
457-
repeat = 1; // schedule on next tick, follows browser behaviour
457+
repeat = 1; // schedule on next tick, follows browser behavior
458458

459459
var timer = new Timeout(repeat, callback, args);
460460
timer._repeat = repeat;

lib/tls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Buffer = require('buffer').Buffer;
1010

1111
// Allow {CLIENT_RENEG_LIMIT} client-initiated session renegotiations
1212
// every {CLIENT_RENEG_WINDOW} seconds. An error event is emitted if more
13-
// renegotations are seen. The settings are applied to all remote client
13+
// renegotiations are seen. The settings are applied to all remote client
1414
// connections.
1515
exports.CLIENT_RENEG_LIMIT = 3;
1616
exports.CLIENT_RENEG_WINDOW = 600;

lib/tty.js

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

5151
// Prevents interleaved or dropped stdout/stderr output for terminals.
5252
// As noted in the following reference, local TTYs tend to be quite fast and
53-
// this behaviour has become expected due historical functionality on OS X,
53+
// this behavior has become expected due historical functionality on OS X,
5454
// even though it was originally intended to change in v1.0.2 (Libuv 1.2.1).
5555
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
5656
this._handle.setBlocking(process.env.NODE_TTY_UNSAFE_ASYNC !== '1');

lib/url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ function autoEscapeStr(rest) {
436436
var lastEscapedPos = 0;
437437
for (var i = 0; i < rest.length; ++i) {
438438
// Manual switching is faster than using a Map/Object.
439-
// `escaped` contains substring up to the last escaped cahracter.
439+
// `escaped` contains substring up to the last escaped character.
440440
switch (rest.charCodeAt(i)) {
441441
case 9: // '\t'
442442
// Concat if there are ordinary characters in the middle.

0 commit comments

Comments
 (0)