Commit 2e22fa0
doc: improve description of module
- Do not use word alias, it isn't well defined
- Fix return value of require() example, which confusingly was not the
exported API as it should have been.
- Fix the require() example, which claimed that the module exported `0`,
when it exports `some_func`.
- Describe best practice in keeping exports and module.exports bound
together.
- Describe why exports exists
- Remove reference to magic, which is also not well defined
PR-URL: #9622
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>exports
1 parent 70633f9 commit 2e22fa0Copy full SHA for 2e22fa0
File tree
Expand file treeCollapse file tree
1 file changed
+31
-14
lines changedOpen diff view settings
Filter options
- doc/api
Expand file treeCollapse file tree
1 file changed
+31
-14
lines changedOpen diff view settings
Collapse file
+31-14Lines changed: 31 additions & 14 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
529 | 529 | |
530 | 530 | |
531 | 531 | |
532 | | - |
| 532 | + |
533 | 533 | |
534 | 534 | |
535 | 535 | |
536 | 536 | |
537 | | - |
538 | | - |
539 | | - |
| 537 | + |
| 538 | + |
| 539 | + |
| 540 | + |
| 541 | + |
| 542 | + |
| 543 | + |
| 544 | + |
| 545 | + |
| 546 | + |
| 547 | + |
| 548 | + |
| 549 | + |
| 550 | + |
| 551 | + |
| 552 | + |
| 553 | + |
| 554 | + |
| 555 | + |
540 | 556 | |
541 | 557 | |
542 | | - |
| 558 | + |
543 | 559 | |
544 | 560 | |
545 | 561 | |
546 | | - |
| 562 | + |
547 | 563 | |
548 | | - |
549 | | - |
550 | | - |
551 | | - |
| 564 | + |
| 565 | + |
| 566 | + |
| 567 | + |
| 568 | + |
| 569 | + |
| 570 | + |
| 571 | + |
552 | 572 | |
553 | | - |
| 573 | + |
554 | 574 | |
555 | 575 | |
556 | 576 | |
557 | | - |
558 | | - |
559 | | - |
560 | 577 | |
561 | 578 | |
562 | 579 | |
|
0 commit comments