summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2016-08-24 12:42:09 +0200
committerAnna Henningsen <anna@addaleax.net>2016-08-27 16:19:26 +0200
commitdf4880de557fabafb625745c6ea75d3b755595d2 (patch)
tree00b6dc913b0d47380b4c8495f93ed94c1d707ffe /doc
parent4863f6a1217d1805c4f1a98a32e7774a6379bf5a (diff)
downloadandroid-node-v8-df4880de557fabafb625745c6ea75d3b755595d2.tar.gz
android-node-v8-df4880de557fabafb625745c6ea75d3b755595d2.tar.bz2
android-node-v8-df4880de557fabafb625745c6ea75d3b755595d2.zip
doc: add `added:` information for modules
PR-URL: https://github.com/nodejs/node/pull/8250 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/modules.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/api/modules.md b/doc/api/modules.md
index 3cba97a976..8de7071fe0 100644
--- a/doc/api/modules.md
+++ b/doc/api/modules.md
@@ -451,6 +451,9 @@ to the module, such as:
module's absolute filename and directory path.
## The `module` Object
+<!-- YAML
+added: v0.1.16
+-->
<!-- type=var -->
<!-- name=module -->
@@ -463,12 +466,18 @@ also accessible via the `exports` module-global. `module` isn't actually
a global but rather local to each module.
### module.children
+<!-- YAML
+added: v0.1.16
+-->
* {Array}
The module objects required by this one.
### module.exports
+<!-- YAML
+added: v0.1.16
+-->
* {Object}
@@ -521,6 +530,9 @@ console.log(x.a);
```
#### exports alias
+<!-- YAML
+added: v0.1.16
+-->
The `exports` variable that is available within a module starts as a reference
to `module.exports`. As with any variable, if you assign a new value to it, it
@@ -546,12 +558,18 @@ As a guideline, if the relationship between `exports` and `module.exports`
seems like magic to you, ignore `exports` and only use `module.exports`.
### module.filename
+<!-- YAML
+added: v0.1.16
+-->
* {String}
The fully resolved filename to the module.
### module.id
+<!-- YAML
+added: v0.1.16
+-->
* {String}
@@ -559,6 +577,9 @@ The identifier for the module. Typically this is the fully resolved
filename.
### module.loaded
+<!-- YAML
+added: v0.1.16
+-->
* {Boolean}
@@ -566,12 +587,18 @@ Whether or not the module is done loading, or is in the process of
loading.
### module.parent
+<!-- YAML
+added: v0.1.16
+-->
* {Object} Module object
The module that first required this one.
### module.require(id)
+<!-- YAML
+added: v0.5.1
+-->
* `id` {String}
* Return: {Object} `module.exports` from the resolved module