Skip to content

Commit 44e5382

Browse files
KCarlilewraithgar
andauthored
Clarified About Modules section in about-packages-and-modules.mdx (npm#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 <[email protected]>
1 parent 3ec803c commit 44e5382

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

content/packages-and-modules/introduction-to-packages-and-modules/about-packages-and-modules.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ To be loaded by the Node.js `require()` function, a module must be one of the fo
5656

5757
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:
5858

59-
var req = require('request')
59+
```
60+
var req = require('request')
61+
```
6062

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

6365
[about-scopes]: about-scopes
6466
[private-pkgs]: about-private-packages

0 commit comments

Comments
 (0)