From 6c97f7fed500a85cbdd8f6bf5813bcb55cb1ec12 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 5 Dec 2017 07:03:04 -0800 Subject: [PATCH] doc: use American spellings per style guide PR-URL: https://github.com/nodejs/node/pull/17471 Reviewed-By: James M Snell Reviewed-By: Jon Moss Reviewed-By: Gibson Fahnestock Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca --- README.md | 2 +- common.gypi | 2 +- lib/internal/repl.js | 2 +- lib/internal/trace_events_async_hooks.js | 2 +- src/node_buffer.cc | 4 ++-- test/addons-napi/test_handle_scope/test_handle_scope.c | 2 +- test/addons-napi/test_number/test.js | 2 +- test/parallel/test-child-process-spawn-typeerror.js | 4 ++-- test/parallel/test-http2-compat-socket-set.js | 2 +- test/parallel/test-http2-compat-socket.js | 4 ++-- test/parallel/test-http2-socket-proxy.js | 2 +- test/parallel/test-net-write-fully-async-buffer.js | 2 +- test/parallel/test-path-zero-length-strings.js | 4 ++-- test/parallel/test-process-kill-pid.js | 2 +- test/parallel/test-stream3-cork-end.js | 2 +- test/parallel/test-stream3-cork-uncork.js | 2 +- test/parallel/test-timers.js | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e6568c466f245b..f4332771ac3e23 100644 --- a/README.md +++ b/README.md @@ -202,7 +202,7 @@ us a report nonetheless. level of privilege possible. - [#12141](https://github.com/nodejs/node/pull/12141): _buffer: zero fill - Buffer(num) by default_. The buffer constructor behaviour was documented, + Buffer(num) by default_. The buffer constructor behavior was documented, but found to be prone to [mis-use](https://snyk.io/blog/exploiting-buffer/). It has since been changed, but despite much debate, was not considered misuse prone enough to justify fixing in older release lines and breaking our diff --git a/common.gypi b/common.gypi index 93d9e3ceee7247..f36d8cb9a01f77 100644 --- a/common.gypi +++ b/common.gypi @@ -169,7 +169,7 @@ 'msvs_settings': { 'VCCLCompilerTool': { 'Optimization': 3, # /Ox, full optimization - 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size + 'FavorSizeOrSpeed': 1, # /Ot, favor speed over size 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG 'OmitFramePointers': 'true', diff --git a/lib/internal/repl.js b/lib/internal/repl.js index 436e72cf75613f..812af56ed2e046 100644 --- a/lib/internal/repl.js +++ b/lib/internal/repl.js @@ -35,7 +35,7 @@ function createRepl(env, opts, cb) { opts.terminal = false; } // the "dumb" special terminal, as defined by terminfo, doesn't support - // ANSI colour control codes. + // ANSI color control codes. // see http://invisible-island.net/ncurses/terminfo.ti.html#toc-_Specials if (parseInt(env.NODE_DISABLE_COLORS) || env.TERM === 'dumb') { opts.useColors = false; diff --git a/lib/internal/trace_events_async_hooks.js b/lib/internal/trace_events_async_hooks.js index 6724e0fdef5f15..6d996b083fb49b 100644 --- a/lib/internal/trace_events_async_hooks.js +++ b/lib/internal/trace_events_async_hooks.js @@ -5,7 +5,7 @@ const async_wrap = process.binding('async_wrap'); const async_hooks = require('async_hooks'); // Use small letters such that chrome://traceing groups by the name. -// The behaviour is not only useful but the same as the events emitted using +// The behavior is not only useful but the same as the events emitted using // the specific C++ macros. const BEFORE_EVENT = 'b'.charCodeAt(0); const END_EVENT = 'e'.charCodeAt(0); diff --git a/src/node_buffer.cc b/src/node_buffer.cc index ca2c6a89cb012a..d9471627a13a12 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -984,7 +984,7 @@ void IndexOfString(const FunctionCallbackInfo& args) { is_forward); if (needle_length == 0) { - // Match String#indexOf() and String#lastIndexOf() behaviour. + // Match String#indexOf() and String#lastIndexOf() behavior. args.GetReturnValue().Set(static_cast(opt_offset)); return; } @@ -1097,7 +1097,7 @@ void IndexOfBuffer(const FunctionCallbackInfo& args) { is_forward); if (needle_length == 0) { - // Match String#indexOf() and String#lastIndexOf() behaviour. + // Match String#indexOf() and String#lastIndexOf() behavior. args.GetReturnValue().Set(static_cast(opt_offset)); return; } diff --git a/test/addons-napi/test_handle_scope/test_handle_scope.c b/test/addons-napi/test_handle_scope/test_handle_scope.c index 81a8c6b6a5465e..31efbcf3dd4d7b 100644 --- a/test/addons-napi/test_handle_scope/test_handle_scope.c +++ b/test/addons-napi/test_handle_scope/test_handle_scope.c @@ -3,7 +3,7 @@ #include // these tests validate the handle scope functions in the normal -// flow. Forcing gc behaviour to fully validate they are doing +// flow. Forcing gc behavior to fully validate they are doing // the right right thing would be quite hard so we keep it // simple for now. diff --git a/test/addons-napi/test_number/test.js b/test/addons-napi/test_number/test.js index b8ce6b7f995b66..e92c6d0cd29951 100644 --- a/test/addons-napi/test_number/test.js +++ b/test/addons-napi/test_number/test.js @@ -39,7 +39,7 @@ const num8 = Number.NEGATIVE_INFINITY; assert.strictEqual(num8, test_number.Test(num8)); -// validate documented behaviour when value is retrieved +// validate documented behavior when value is retrieved // as 32 bit integer with napi_get_value_int32 assert.strictEqual(1, test_number.TestInt32Truncation(4294967297)); assert.strictEqual(0, test_number.TestInt32Truncation(4294967296)); diff --git a/test/parallel/test-child-process-spawn-typeerror.js b/test/parallel/test-child-process-spawn-typeerror.js index d8ae4c758ce3a1..065d1345d54ad9 100644 --- a/test/parallel/test-child-process-spawn-typeerror.js +++ b/test/parallel/test-child-process-spawn-typeerror.js @@ -114,7 +114,7 @@ assert.throws(function() { spawn(cmd, s); }, TypeError); assert.throws(function() { spawn(cmd, a, s); }, TypeError); -// verify that execFile has same argument parsing behaviour as spawn +// verify that execFile has same argument parsing behavior as spawn // // function execFile(file=f [,args=a] [, options=o] [, callback=c]) has valid // combinations: @@ -174,7 +174,7 @@ assert.throws(function() { execFile(cmd, n, o, s); }, TypeError); assert.doesNotThrow(function() { execFile(cmd, c, s); }); -// verify that fork has same argument parsing behaviour as spawn +// verify that fork has same argument parsing behavior as spawn // // function fork(file=f [,args=a] [, options=o]) has valid combinations: // (f) diff --git a/test/parallel/test-http2-compat-socket-set.js b/test/parallel/test-http2-compat-socket-set.js index 87b7a2b4448c86..ff53d998f4d207 100644 --- a/test/parallel/test-http2-compat-socket-set.js +++ b/test/parallel/test-http2-compat-socket-set.js @@ -6,7 +6,7 @@ if (!common.hasCrypto) const assert = require('assert'); const h2 = require('http2'); -// Tests behaviour of the proxied socket in Http2ServerRequest +// Tests behavior of the proxied socket in Http2ServerRequest // & Http2ServerResponse - specifically property setters const errMsg = { diff --git a/test/parallel/test-http2-compat-socket.js b/test/parallel/test-http2-compat-socket.js index 5d97872dfb6a14..d30b2f2a11613b 100644 --- a/test/parallel/test-http2-compat-socket.js +++ b/test/parallel/test-http2-compat-socket.js @@ -7,9 +7,9 @@ const assert = require('assert'); const h2 = require('http2'); const net = require('net'); -// Tests behaviour of the proxied socket in Http2ServerRequest +// Tests behavior of the proxied socket in Http2ServerRequest // & Http2ServerResponse - this proxy socket should mimic the -// behaviour of http1 but against the http2 api & model +// behavior of http1 but against the http2 api & model const errMsg = { code: 'ERR_HTTP2_NO_SOCKET_MANIPULATION', diff --git a/test/parallel/test-http2-socket-proxy.js b/test/parallel/test-http2-socket-proxy.js index 60f31837790d51..3b15c18628d218 100644 --- a/test/parallel/test-http2-socket-proxy.js +++ b/test/parallel/test-http2-socket-proxy.js @@ -7,7 +7,7 @@ const assert = require('assert'); const h2 = require('http2'); const net = require('net'); -// Tests behaviour of the proxied socket on Http2Session +// Tests behavior of the proxied socket on Http2Session const errMsg = { code: 'ERR_HTTP2_NO_SOCKET_MANIPULATION', diff --git a/test/parallel/test-net-write-fully-async-buffer.js b/test/parallel/test-net-write-fully-async-buffer.js index 04fd1231fdc322..207ae24f6a32d0 100644 --- a/test/parallel/test-net-write-fully-async-buffer.js +++ b/test/parallel/test-net-write-fully-async-buffer.js @@ -3,7 +3,7 @@ // Note: This is a variant of test-net-write-fully-async-hex-string.js. // This always worked, but it seemed appropriate to add a test that checks the -// behaviour for Buffers, too. +// behavior for Buffers, too. const common = require('../common'); const net = require('net'); diff --git a/test/parallel/test-path-zero-length-strings.js b/test/parallel/test-path-zero-length-strings.js index ec9585fafaa169..c1b74c515fccdc 100644 --- a/test/parallel/test-path-zero-length-strings.js +++ b/test/parallel/test-path-zero-length-strings.js @@ -1,8 +1,8 @@ 'use strict'; -// These testcases are specific to one uncommon behaviour in path module. Few +// These testcases are specific to one uncommon behavior in path module. Few // of the functions in path module, treat '' strings as current working -// directory. This test makes sure that the behaviour is intact between commits. +// directory. This test makes sure that the behavior is intact between commits. // See: https://github.com/nodejs/node/pull/2106 require('../common'); diff --git a/test/parallel/test-process-kill-pid.js b/test/parallel/test-process-kill-pid.js index b020f6bc615b3c..2ff35c6e4f866f 100644 --- a/test/parallel/test-process-kill-pid.js +++ b/test/parallel/test-process-kill-pid.js @@ -92,7 +92,7 @@ function kill(tryPid, trySig, expectPid, expectSig) { } // Note that SIGHUP and SIGTERM map to 1 and 15 respectively, even on Windows -// (for Windows, libuv maps 1 and 15 to the correct behaviour). +// (for Windows, libuv maps 1 and 15 to the correct behavior). kill(0, 'SIGHUP', 0, 1); kill(0, undefined, 0, 15); diff --git a/test/parallel/test-stream3-cork-end.js b/test/parallel/test-stream3-cork-end.js index 85781cdf7187f2..fb109e6bb8c942 100644 --- a/test/parallel/test-stream3-cork-end.js +++ b/test/parallel/test-stream3-cork-end.js @@ -4,7 +4,7 @@ const assert = require('assert'); const stream = require('stream'); const Writable = stream.Writable; -// Test the buffering behaviour of Writable streams. +// Test the buffering behavior of Writable streams. // // The call to cork() triggers storing chunks which are flushed // on calling end() and the stream subsequently ended. diff --git a/test/parallel/test-stream3-cork-uncork.js b/test/parallel/test-stream3-cork-uncork.js index 2e8e86be1ef058..aa9df481cd720e 100644 --- a/test/parallel/test-stream3-cork-uncork.js +++ b/test/parallel/test-stream3-cork-uncork.js @@ -4,7 +4,7 @@ const assert = require('assert'); const stream = require('stream'); const Writable = stream.Writable; -// Test the buffering behaviour of Writable streams. +// Test the buffering behavior of Writable streams. // // The call to cork() triggers storing chunks which are flushed // on calling uncork() in the same tick. diff --git a/test/parallel/test-timers.js b/test/parallel/test-timers.js index 9a93c55eff5989..1aa5d351a4d4bd 100644 --- a/test/parallel/test-timers.js +++ b/test/parallel/test-timers.js @@ -47,7 +47,7 @@ const inputs = [ 0.5, 1, 1.0, - 2147483648, // browser behaviour: timeouts > 2^31-1 run on next tick + 2147483648, // browser behavior: timeouts > 2^31-1 run on next tick 12345678901234 // ditto ];