diff --git a/doc/api/modules.md b/doc/api/modules.md index 8b06b02f2f2c6b..1b5f9a2b708777 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -688,6 +688,7 @@ node entry.js ```js Module { id: '.', + path: '/absolute/path/to', exports: {}, parent: null, filename: '/absolute/path/to/entry.js', @@ -899,6 +900,16 @@ added: v0.1.16 The module that first required this one. +### `module.path` + + +* {string} + +The directory name of the module. This is usually the same as the +[`path.dirname()`][] of the [`module.id`][]. + ### `module.paths`