diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2022-04-20 01:46:37 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2022-04-28 07:56:13 +0300 |
commit | 025b3e786a3773eb078beb46a37376a08ecaaf9f (patch) | |
tree | ba185ab286daf859e77009a82b3247eba3220e0b /lib | |
parent | d311916f376f9ce07cbd93086db4560b59827259 (diff) |
doc: consolidate use of multiple-byte units
Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units
PR-URL: https://github.com/nodejs/node/pull/42587
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/assert.js | 2 | ||||
-rw-r--r-- | lib/fs.js | 2 | ||||
-rw-r--r-- | lib/internal/crypto/scrypt.js | 2 | ||||
-rw-r--r-- | lib/internal/errors.js | 2 | ||||
-rw-r--r-- | lib/internal/fs/utils.js | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/assert.js b/lib/assert.js index bbd3c283c5f..2c7cf369a87 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -213,7 +213,7 @@ function getCode(fd, line, column) { let lines = 0; // Prevent blocking the event loop by limiting the maximum amount of // data that may be read. - let maxReads = 32; // bytesPerRead * maxReads = 512 kb + let maxReads = 32; // bytesPerRead * maxReads = 512 KiB const bytesPerRead = 16384; // Use a single buffer up front that is reused until the call site is found. let buffer = Buffer.allocUnsafe(bytesPerRead); diff --git a/lib/fs.js b/lib/fs.js index 405c206d566..7b10c3d9f43 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -2879,7 +2879,7 @@ function lazyLoadStreams() { /** * Creates a readable stream with a default `highWaterMark` - * of 64 kb. + * of 64 KiB. * @param {string | Buffer | URL} path * @param {string | { * flags?: string; diff --git a/lib/internal/crypto/scrypt.js b/lib/internal/crypto/scrypt.js index 0d0ac1f7261..a36fb6dfba5 100644 --- a/lib/internal/crypto/scrypt.js +++ b/lib/internal/crypto/scrypt.js @@ -41,7 +41,7 @@ const defaults = { N: 16384, r: 8, p: 1, - maxmem: 32 << 20, // 32 MB, matches SCRYPT_MAX_MEM. + maxmem: 32 << 20, // 32 MiB, matches SCRYPT_MAX_MEM. }; function scrypt(password, salt, keylen, options, callback = defaults) { diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 434576bde16..1dfa36e5f36 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -1004,7 +1004,7 @@ E('ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY', 'Cannot overwrite symlink in subdirectory of self', SystemError); E('ERR_FS_CP_UNKNOWN', 'Cannot copy an unknown file type', SystemError); E('ERR_FS_EISDIR', 'Path is a directory', SystemError); -E('ERR_FS_FILE_TOO_LARGE', 'File size (%s) is greater than 2 GB', RangeError); +E('ERR_FS_FILE_TOO_LARGE', 'File size (%s) is greater than 2 GiB', RangeError); E('ERR_FS_INVALID_SYMLINK_TYPE', 'Symlink type must be one of "dir", "file", or "junction". Received "%s"', Error); // Switch to TypeError. The current implementation does not seem right diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index 61670011372..e570b42da88 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -122,7 +122,7 @@ const kMaximumCopyMode = COPYFILE_EXCL | COPYFILE_FICLONE | COPYFILE_FICLONE_FORCE; -// Most platforms don't allow reads or writes >= 2 GB. +// Most platforms don't allow reads or writes >= 2 GiB. // See https://github.com/libuv/libuv/pull/1501. const kIoMaxLength = 2 ** 31 - 1; |