Clarified About Modules section in about-packages-and-modules.mdx (#1148)
Updated the About Modules documentation section of <https://docs.npmjs.com/about-packages-and-modules> to improve clarity of messaging. Co-authored-by: Gar <gar+gh@danger.computer>
Kenny Carlile committed
Aug 12, 2024 at 08:10 UTC
44e5382005003f075c4f0a655fd77c075c0f8b05
1 file changed
+4
-2
content/packages-and-modules/introduction-to-packages-and-modules/about-packages-and-modules.mdx
+4
-2
@@ -56,9 +56,11 @@ To be loaded by the Node.js `require()` function, a module must be one of the fo
56
57
In the context of a Node program, the `module` is also the thing that was loaded _from_ a file. For example, in the following program:
58
59
- var req = require('request')
59
+```
60
+var req = require('request')
61
+```
62
61
-we might say that "The variable `req` refers to the `request` module".
63
+The `req` variable refers to the `request` module returned by the `require()` function.
64
65
[about-scopes]: about-scopes
66
[private-pkgs]: about-private-packages