@@ -120,7 +120,12 @@ plan accordingly.
120
120
Node.js has several modules compiled into the binary. These modules are
121
121
described in greater detail elsewhere in this documentation.
122
122
123
+ <<<<<<< HEAD
123
124
The core modules are defined in Node.js's source in the ` lib/ ` folder.
125
+ =======
126
+ The core modules are defined within io.js's source and are located in the
127
+ ` lib/ ` folder.
128
+ >>>>>>> doc: small clarifications to modules.markdown
124
129
125
130
Core modules are always preferentially loaded if their identifier is
126
131
passed to ` require() ` . For instance, ` require('http') ` will always
@@ -130,23 +135,29 @@ return the built in HTTP module, even if there is a file by that name.
130
135
131
136
<!-- type=misc-->
132
137
138
+ <<<<<<< HEAD
133
139
If the exact filename is not found, then Node.js will attempt to load the
134
140
required filename with the added extension of ` .js ` , ` .json ` , and then ` .node ` .
141
+ =======
142
+ If the exact filename is not found, then io.js will attempt to load the
143
+ required filename with the added extensions: ` .js ` , ` .json ` , and finally
144
+ ` .node ` .
145
+ >>>>>>> doc: small clarifications to modules.markdown
135
146
136
147
` .js ` files are interpreted as JavaScript text files, and ` .json ` files are
137
148
parsed as JSON text files. ` .node ` files are interpreted as compiled addon
138
149
modules loaded with ` dlopen ` .
139
150
140
- A module prefixed with ` '/' ` is an absolute path to the file. For
151
+ A required module prefixed with ` '/' ` is an absolute path to the file. For
141
152
example, ` require('/home/marco/foo.js') ` will load the file at
142
153
` /home/marco/foo.js ` .
143
154
144
- A module prefixed with ` './' ` is relative to the file calling ` require() ` .
145
- That is, ` circle.js ` must be in the same directory as ` foo.js ` for
155
+ A required module prefixed with ` './' ` is relative to the file calling
156
+ ` require() ` . That is, ` circle.js ` must be in the same directory as ` foo.js ` for
146
157
` require('./circle') ` to find it.
147
158
148
- Without a leading '/', './', or '../' to indicate a file, the module is either a
149
- core module or is loaded from a ` node_modules ` folder.
159
+ Without a leading '/', './', or '../' to indicate a file, the module must
160
+ either be a core module or is loaded from a ` node_modules ` folder.
150
161
151
162
If the given path does not exist, ` require() ` will throw an Error with its
152
163
` code ` property set to ` 'MODULE_NOT_FOUND' ` .
0 commit comments