Commit 5887c2b
committed
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: nodejs#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 f8a5033 commit 5887c2b
1 file changed
+31
-14
lines changed| 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