Skip to content

Commit 1db808c

Browse files
committed
lib: fix comment nits in bootstrap\loaders.js
PR-URL: #24641 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
1 parent 11c17e4 commit 1db808c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/internal/bootstrap/loaders.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// can be created using NODE_MODULE_CONTEXT_AWARE_CPP() with the flag
2020
// NM_F_LINKED.
2121
// - internalBinding(): the private internal C++ binding loader, inaccessible
22-
// from user land because they are only available from NativeModule.require()
22+
// from user land because they are only available from NativeModule.require().
2323
// These C++ bindings are created using NODE_MODULE_CONTEXT_AWARE_INTERNAL()
2424
// and have their nm_flags set to NM_F_INTERNAL.
2525
//
@@ -61,7 +61,7 @@
6161
keys: ObjectKeys,
6262
} = Object;
6363

64-
// Set up process.moduleLoadList
64+
// Set up process.moduleLoadList.
6565
const moduleLoadList = [];
6666
ObjectDefineProperty(process, 'moduleLoadList', {
6767
value: moduleLoadList,
@@ -71,7 +71,7 @@
7171
});
7272

7373
// internalBindingWhitelist contains the name of internalBinding modules
74-
// that are whitelisted for access via process.binding()... this is used
74+
// that are whitelisted for access via process.binding()... This is used
7575
// to provide a transition path for modules that are being moved over to
7676
// internalBinding.
7777
const internalBindingWhitelist = [
@@ -106,7 +106,7 @@
106106
// for checking existence in this list.
107107
let internalBindingWhitelistSet;
108108

109-
// Set up process.binding() and process._linkedBinding()
109+
// Set up process.binding() and process._linkedBinding().
110110
{
111111
const bindingObj = ObjectCreate(null);
112112

@@ -134,7 +134,7 @@
134134
};
135135
}
136136

137-
// Set up internalBinding() in the closure
137+
// Set up internalBinding() in the closure.
138138
let internalBinding;
139139
{
140140
const bindingObj = ObjectCreate(null);
@@ -148,10 +148,10 @@
148148
};
149149
}
150150

151-
// Create this WeakMap in js-land because V8 has no C++ API for WeakMap
151+
// Create this WeakMap in js-land because V8 has no C++ API for WeakMap.
152152
internalBinding('module_wrap').callbackMap = new WeakMap();
153153

154-
// Set up NativeModule
154+
// Set up NativeModule.
155155
function NativeModule(id) {
156156
this.filename = `${id}.js`;
157157
this.id = id;
@@ -185,7 +185,7 @@
185185
if (!NativeModule.exists(id)) {
186186
// Model the error off the internal/errors.js model, but
187187
// do not use that module given that it could actually be
188-
// the one causing the error if there's a bug in Node.js
188+
// the one causing the error if there's a bug in Node.js.
189189
// eslint-disable-next-line no-restricted-syntax
190190
const err = new Error(`No such built-in module: ${id}`);
191191
err.code = 'ERR_UNKNOWN_BUILTIN_MODULE';
@@ -226,15 +226,15 @@
226226

227227
if (config.exposeInternals) {
228228
NativeModule.nonInternalExists = function(id) {
229-
// Do not expose this to user land even with --expose-internals
229+
// Do not expose this to user land even with --expose-internals.
230230
if (id === loaderId) {
231231
return false;
232232
}
233233
return NativeModule.exists(id);
234234
};
235235

236236
NativeModule.isInternal = function(id) {
237-
// Do not expose this to user land even with --expose-internals
237+
// Do not expose this to user land even with --expose-internals.
238238
return id === loaderId;
239239
};
240240
} else {
@@ -268,7 +268,7 @@
268268
};
269269

270270
// Provide named exports for all builtin libraries so that the libraries
271-
// may be imported in a nicer way for esm users. The default export is left
271+
// may be imported in a nicer way for ESM users. The default export is left
272272
// as the entire namespace (module.exports) and wrapped in a proxy such
273273
// that APMs and other behavior are still left intact.
274274
NativeModule.prototype.proxifyExports = function() {
@@ -353,7 +353,7 @@
353353
NativeModule._cache[this.id] = this;
354354
};
355355

356-
// coverage must be turned on early, so that we can collect
356+
// Coverage must be turned on early, so that we can collect
357357
// it for Node.js' own internal libraries.
358358
if (process.env.NODE_V8_COVERAGE) {
359359
NativeModule.require('internal/process/coverage').setup();

0 commit comments

Comments
 (0)