From 0382344e1bb25f0f11310b852fd432d4612f5bb3 Mon Sep 17 00:00:00 2001 From: Vicente Jimenez Aguilar Date: Sun, 18 Dec 2016 17:21:29 +0100 Subject: [PATCH] doc: require() tries first core not native modules Change a single word in documentation with a more precise one. Native is a module compiled in machine "native" code. A module normally written in a compiled language, not in JavaScript. Core modules form Node's built-in "core" functionalities. You don't need to install them. They are included in every Node installation and documented in https://nodejs.org/api/ . PR-URL: https://github.com/nodejs/node/pull/10324 Reviewed-By: Colin Ihrig Reviewed-By: Italo A. Casas Reviewed-By: Gibson Fahnestock Reviewed-By: Sam Roberts Reviewed-By: James M Snell --- doc/api/modules.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index f5dba78dac84b1..338e7e1c6ce2e5 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -368,11 +368,11 @@ example, then `require('./some-library')` would attempt to load: -If the module identifier passed to `require()` is not a native module, -and does not begin with `'/'`, `'../'`, or `'./'`, then Node.js starts at the -parent directory of the current module, and adds `/node_modules`, and -attempts to load the module from that location. Node will not append -`node_modules` to a path already ending in `node_modules`. +If the module identifier passed to `require()` is not a +[core](#modules_core_modules) module, and does not begin with `'/'`, `'../'`, or +`'./'`, then Node.js starts at the parent directory of the current module, and +adds `/node_modules`, and attempts to load the module from that location. Node +will not append `node_modules` to a path already ending in `node_modules`. If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached.