File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -451,6 +451,9 @@ to the module, such as:
451
451
module's absolute filename and directory path.
452
452
453
453
## The ` module ` Object
454
+ <!-- YAML
455
+ added: v0.1.16
456
+ -->
454
457
455
458
<!-- type=var -->
456
459
<!-- name=module -->
@@ -463,12 +466,18 @@ also accessible via the `exports` module-global. `module` isn't actually
463
466
a global but rather local to each module.
464
467
465
468
### module.children
469
+ <!-- YAML
470
+ added: v0.1.16
471
+ -->
466
472
467
473
* {Array}
468
474
469
475
The module objects required by this one.
470
476
471
477
### module.exports
478
+ <!-- YAML
479
+ added: v0.1.16
480
+ -->
472
481
473
482
* {Object}
474
483
@@ -521,6 +530,9 @@ console.log(x.a);
521
530
```
522
531
523
532
#### exports alias
533
+ <!-- YAML
534
+ added: v0.1.16
535
+ -->
524
536
525
537
The ` exports ` variable that is available within a module starts as a reference
526
538
to ` module.exports ` . As with any variable, if you assign a new value to it, it
@@ -546,32 +558,47 @@ As a guideline, if the relationship between `exports` and `module.exports`
546
558
seems like magic to you, ignore ` exports ` and only use ` module.exports ` .
547
559
548
560
### module.filename
561
+ <!-- YAML
562
+ added: v0.1.16
563
+ -->
549
564
550
565
* {String}
551
566
552
567
The fully resolved filename to the module.
553
568
554
569
### module.id
570
+ <!-- YAML
571
+ added: v0.1.16
572
+ -->
555
573
556
574
* {String}
557
575
558
576
The identifier for the module. Typically this is the fully resolved
559
577
filename.
560
578
561
579
### module.loaded
580
+ <!-- YAML
581
+ added: v0.1.16
582
+ -->
562
583
563
584
* {Boolean}
564
585
565
586
Whether or not the module is done loading, or is in the process of
566
587
loading.
567
588
568
589
### module.parent
590
+ <!-- YAML
591
+ added: v0.1.16
592
+ -->
569
593
570
594
* {Object} Module object
571
595
572
596
The module that first required this one.
573
597
574
598
### module.require(id)
599
+ <!-- YAML
600
+ added: v0.5.1
601
+ -->
575
602
576
603
* ` id ` {String}
577
604
* Return: {Object} ` module.exports ` from the resolved module
You can’t perform that action at this time.
0 commit comments