Skip to content

Commit 1063e0c

Browse files
vsemozhetbytrvagg
authored andcommitted
lib: fix comment nits in bootstrap\loaders.js
PR-URL: #24641 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent 9caad06 commit 1063e0c

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 = [
@@ -105,7 +105,7 @@
105105
// for checking existence in this list.
106106
let internalBindingWhitelistSet;
107107

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

@@ -133,7 +133,7 @@
133133
};
134134
}
135135

136-
// Set up internalBinding() in the closure
136+
// Set up internalBinding() in the closure.
137137
let internalBinding;
138138
{
139139
const bindingObj = ObjectCreate(null);
@@ -147,10 +147,10 @@
147147
};
148148
}
149149

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

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

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

235235
NativeModule.isInternal = function(id) {
236-
// Do not expose this to user land even with --expose-internals
236+
// Do not expose this to user land even with --expose-internals.
237237
return id === loaderId;
238238
};
239239
} else {
@@ -267,7 +267,7 @@
267267
};
268268

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

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

0 commit comments

Comments
 (0)