Skip to content
Browse files

doc: add review suggestions to require()

PR-URL: #23605
Reviewed-By: Denys Otrishko <>
Reviewed-By: Trivikram Kamat <>
Reviewed-By: Gireesh Punathil <>
Reviewed-By: Sakthipriyan Vairamani <>
Reviewed-By: Vse Mozhet Byt <>
Reviewed-By: Ruben Bridgewater <>
Reviewed-By: James M Snell <>
  • Loading branch information
ErickWendel authored and MylesBorins committed Oct 12, 2018
1 parent a97e79c commit ace83a24a2f18f5b17685f0f82c528bef5d7ae3f
Showing with 16 additions and 1 deletion.
  1. +16 −1 doc/api/
@@ -552,7 +552,22 @@ added: v0.1.13

* {Function}

To require modules.
Used to import modules, `JSON`, and local files. Modules can be imported
from `node_modules`. Local modules and JSON files can be imported using
a relative path (e.g. `./`, `./foo`, `./bar/baz`, `../foo`) that will be
resolved against the directory named by [`__dirname`][] (if defined) or
the current working directory.

// Importing a local module:
const myLocalModule = require('./path/myLocalModule');
// Importing a JSON file:
const jsonData = require('./path/filename.json');
// Importing a module from node_modules or Node.js built-in module:
const crypto = require('crypto');

#### require.cache
<!-- YAML

0 comments on commit ace83a2

Please sign in to comment.
You can’t perform that action at this time.