From df4880de557fabafb625745c6ea75d3b755595d2 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 24 Aug 2016 12:42:09 +0200 Subject: [PATCH] doc: add `added:` information for modules PR-URL: https://github.com/nodejs/node/pull/8250 Reviewed-By: Anna Henningsen Reviewed-By: Bryan English Reviewed-By: James M Snell --- doc/api/modules.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/doc/api/modules.md b/doc/api/modules.md index 3cba97a9763eeb..8de7071fe03082 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 + @@ -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 + * {Array} The module objects required by this one. ### module.exports + * {Object} @@ -521,6 +530,9 @@ console.log(x.a); ``` #### exports alias + 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 + * {String} The fully resolved filename to the module. ### module.id + * {String} @@ -559,6 +577,9 @@ The identifier for the module. Typically this is the fully resolved filename. ### module.loaded + * {Boolean} @@ -566,12 +587,18 @@ Whether or not the module is done loading, or is in the process of loading. ### module.parent + * {Object} Module object The module that first required this one. ### module.require(id) + * `id` {String} * Return: {Object} `module.exports` from the resolved module