minor fixes
This commit is contained in:
parent
70bb2653e5
commit
fc3c0714db
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ That's exactly because the module is executed only once. Exports are generated,
|
|||
|
||||
In other words, a module can provide a generic functionality that needs a setup. E.g. authentication needs credentials. Then it can export a configuration object expecting the outer code to assign to it.
|
||||
|
||||
Here's a classical pattern:
|
||||
Here's the classical pattern:
|
||||
1. A module exports some means of configuration, e.g. a configuration object.
|
||||
2. On the first import we initialize it, write to its properties. The top-level application script may do that.
|
||||
3. Further imports use the module.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue