Skip to content

Commit 6c97f7f

Browse files
TrottMylesBorins
authored andcommitted
doc: use American spellings per style guide
PR-URL: #17471 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent a407a48 commit 6c97f7f

17 files changed

+21
-21
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ us a report nonetheless.
202202
level of privilege possible.
203203

204204
- [#12141](https://github.com/nodejs/node/pull/12141): _buffer: zero fill
205-
Buffer(num) by default_. The buffer constructor behaviour was documented,
205+
Buffer(num) by default_. The buffer constructor behavior was documented,
206206
but found to be prone to [mis-use](https://snyk.io/blog/exploiting-buffer/).
207207
It has since been changed, but despite much debate, was not considered misuse
208208
prone enough to justify fixing in older release lines and breaking our

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
'msvs_settings': {
170170
'VCCLCompilerTool': {
171171
'Optimization': 3, # /Ox, full optimization
172-
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
172+
'FavorSizeOrSpeed': 1, # /Ot, favor speed over size
173173
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
174174
'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG
175175
'OmitFramePointers': 'true',

lib/internal/repl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function createRepl(env, opts, cb) {
3535
opts.terminal = false;
3636
}
3737
// the "dumb" special terminal, as defined by terminfo, doesn't support
38-
// ANSI colour control codes.
38+
// ANSI color control codes.
3939
// see http://invisible-island.net/ncurses/terminfo.ti.html#toc-_Specials
4040
if (parseInt(env.NODE_DISABLE_COLORS) || env.TERM === 'dumb') {
4141
opts.useColors = false;

lib/internal/trace_events_async_hooks.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const async_wrap = process.binding('async_wrap');
55
const async_hooks = require('async_hooks');
66

77
// Use small letters such that chrome://traceing groups by the name.
8-
// The behaviour is not only useful but the same as the events emitted using
8+
// The behavior is not only useful but the same as the events emitted using
99
// the specific C++ macros.
1010
const BEFORE_EVENT = 'b'.charCodeAt(0);
1111
const END_EVENT = 'e'.charCodeAt(0);

src/node_buffer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ void IndexOfString(const FunctionCallbackInfo<Value>& args) {
984984
is_forward);
985985

986986
if (needle_length == 0) {
987-
// Match String#indexOf() and String#lastIndexOf() behaviour.
987+
// Match String#indexOf() and String#lastIndexOf() behavior.
988988
args.GetReturnValue().Set(static_cast<double>(opt_offset));
989989
return;
990990
}
@@ -1097,7 +1097,7 @@ void IndexOfBuffer(const FunctionCallbackInfo<Value>& args) {
10971097
is_forward);
10981098

10991099
if (needle_length == 0) {
1100-
// Match String#indexOf() and String#lastIndexOf() behaviour.
1100+
// Match String#indexOf() and String#lastIndexOf() behavior.
11011101
args.GetReturnValue().Set(static_cast<double>(opt_offset));
11021102
return;
11031103
}

test/addons-napi/test_handle_scope/test_handle_scope.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <string.h>
44

55
// these tests validate the handle scope functions in the normal
6-
// flow. Forcing gc behaviour to fully validate they are doing
6+
// flow. Forcing gc behavior to fully validate they are doing
77
// the right right thing would be quite hard so we keep it
88
// simple for now.
99

test/addons-napi/test_number/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const num8 = Number.NEGATIVE_INFINITY;
3939
assert.strictEqual(num8, test_number.Test(num8));
4040

4141

42-
// validate documented behaviour when value is retrieved
42+
// validate documented behavior when value is retrieved
4343
// as 32 bit integer with napi_get_value_int32
4444
assert.strictEqual(1, test_number.TestInt32Truncation(4294967297));
4545
assert.strictEqual(0, test_number.TestInt32Truncation(4294967296));

test/parallel/test-child-process-spawn-typeerror.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ assert.throws(function() { spawn(cmd, s); }, TypeError);
114114
assert.throws(function() { spawn(cmd, a, s); }, TypeError);
115115

116116

117-
// verify that execFile has same argument parsing behaviour as spawn
117+
// verify that execFile has same argument parsing behavior as spawn
118118
//
119119
// function execFile(file=f [,args=a] [, options=o] [, callback=c]) has valid
120120
// combinations:
@@ -174,7 +174,7 @@ assert.throws(function() { execFile(cmd, n, o, s); }, TypeError);
174174
assert.doesNotThrow(function() { execFile(cmd, c, s); });
175175

176176

177-
// verify that fork has same argument parsing behaviour as spawn
177+
// verify that fork has same argument parsing behavior as spawn
178178
//
179179
// function fork(file=f [,args=a] [, options=o]) has valid combinations:
180180
// (f)

test/parallel/test-http2-compat-socket-set.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if (!common.hasCrypto)
66
const assert = require('assert');
77
const h2 = require('http2');
88

9-
// Tests behaviour of the proxied socket in Http2ServerRequest
9+
// Tests behavior of the proxied socket in Http2ServerRequest
1010
// & Http2ServerResponse - specifically property setters
1111

1212
const errMsg = {

test/parallel/test-http2-compat-socket.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ const assert = require('assert');
77
const h2 = require('http2');
88
const net = require('net');
99

10-
// Tests behaviour of the proxied socket in Http2ServerRequest
10+
// Tests behavior of the proxied socket in Http2ServerRequest
1111
// & Http2ServerResponse - this proxy socket should mimic the
12-
// behaviour of http1 but against the http2 api & model
12+
// behavior of http1 but against the http2 api & model
1313

1414
const errMsg = {
1515
code: 'ERR_HTTP2_NO_SOCKET_MANIPULATION',

test/parallel/test-http2-socket-proxy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const assert = require('assert');
77
const h2 = require('http2');
88
const net = require('net');
99

10-
// Tests behaviour of the proxied socket on Http2Session
10+
// Tests behavior of the proxied socket on Http2Session
1111

1212
const errMsg = {
1313
code: 'ERR_HTTP2_NO_SOCKET_MANIPULATION',

test/parallel/test-net-write-fully-async-buffer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// Note: This is a variant of test-net-write-fully-async-hex-string.js.
55
// This always worked, but it seemed appropriate to add a test that checks the
6-
// behaviour for Buffers, too.
6+
// behavior for Buffers, too.
77
const common = require('../common');
88
const net = require('net');
99

test/parallel/test-path-zero-length-strings.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
22

3-
// These testcases are specific to one uncommon behaviour in path module. Few
3+
// These testcases are specific to one uncommon behavior in path module. Few
44
// of the functions in path module, treat '' strings as current working
5-
// directory. This test makes sure that the behaviour is intact between commits.
5+
// directory. This test makes sure that the behavior is intact between commits.
66
// See: https://github.com/nodejs/node/pull/2106
77

88
require('../common');

test/parallel/test-process-kill-pid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function kill(tryPid, trySig, expectPid, expectSig) {
9292
}
9393

9494
// Note that SIGHUP and SIGTERM map to 1 and 15 respectively, even on Windows
95-
// (for Windows, libuv maps 1 and 15 to the correct behaviour).
95+
// (for Windows, libuv maps 1 and 15 to the correct behavior).
9696

9797
kill(0, 'SIGHUP', 0, 1);
9898
kill(0, undefined, 0, 15);

test/parallel/test-stream3-cork-end.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const assert = require('assert');
44
const stream = require('stream');
55
const Writable = stream.Writable;
66

7-
// Test the buffering behaviour of Writable streams.
7+
// Test the buffering behavior of Writable streams.
88
//
99
// The call to cork() triggers storing chunks which are flushed
1010
// on calling end() and the stream subsequently ended.

test/parallel/test-stream3-cork-uncork.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const assert = require('assert');
44
const stream = require('stream');
55
const Writable = stream.Writable;
66

7-
// Test the buffering behaviour of Writable streams.
7+
// Test the buffering behavior of Writable streams.
88
//
99
// The call to cork() triggers storing chunks which are flushed
1010
// on calling uncork() in the same tick.

test/parallel/test-timers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const inputs = [
4747
0.5,
4848
1,
4949
1.0,
50-
2147483648, // browser behaviour: timeouts > 2^31-1 run on next tick
50+
2147483648, // browser behavior: timeouts > 2^31-1 run on next tick
5151
12345678901234 // ditto
5252
];
5353

0 commit comments

Comments
 (0)