Skip to content

Commit

Permalink
doc: use American spellings per style guide
Browse files Browse the repository at this point in the history
PR-URL: nodejs#17471
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott committed Dec 7, 2017
1 parent 3d64533 commit d4cd8c2
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/trace_events_async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/node_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ void IndexOfString(const FunctionCallbackInfo<Value>& 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<double>(opt_offset));
return;
}
Expand Down Expand Up @@ -1098,7 +1098,7 @@ void IndexOfBuffer(const FunctionCallbackInfo<Value>& 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<double>(opt_offset));
return;
}
Expand Down
2 changes: 1 addition & 1 deletion test/addons-napi/test_handle_scope/test_handle_scope.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <string.h>

// 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.

Expand Down
2 changes: 1 addition & 1 deletion test/addons-napi/test_number/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-child-process-spawn-typeerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ assert.throws(function() { spawn(cmd, s); }, invalidArgTypeError);
assert.throws(function() { spawn(cmd, a, s); }, invalidArgTypeError);


// 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:
Expand Down Expand Up @@ -176,7 +176,7 @@ assert.throws(function() { execFile(cmd, n, o, s); }, invalidArgValueError);
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)
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-compat-socket-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http2-compat-socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-http2-socket-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-net-write-fully-async-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-path-zero-length-strings.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-process-kill-pid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-stream3-cork-end.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-stream3-cork-uncork.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
];

Expand Down

0 comments on commit d4cd8c2

Please sign in to comment.