@@ -14,6 +14,8 @@ const os = require('os');
14
14
added: v0.7.8
15
15
-->
16
16
17
+ * {String}
18
+
17
19
A string constant defining the operating system-specific end-of-line marker:
18
20
19
21
* ` \n ` on POSIX
@@ -35,6 +37,8 @@ Equivalent to [`process.arch`][].
35
37
36
38
## os.constants
37
39
40
+ * {Object}
41
+
38
42
Returns an object containing commonly used operating system specific constants
39
43
for error codes, process signals, and so on. The specific constants currently
40
44
defined are described in [ OS Constants] [ ] .
@@ -44,6 +48,8 @@ defined are described in [OS Constants][].
44
48
added: v0.3.3
45
49
-->
46
50
51
+ * Returns: {Array}
52
+
47
53
The ` os.cpus() ` method returns an array of objects containing information about
48
54
each CPU/core installed.
49
55
@@ -161,6 +167,8 @@ all processors are always 0.
161
167
added: v0.9.4
162
168
-->
163
169
170
+ * Returns: {String}
171
+
164
172
The ` os.endianness() ` method returns a string identifying the endianness of the
165
173
CPU * for which the Node.js binary was compiled* .
166
174
@@ -174,6 +182,8 @@ Possible values are:
174
182
added: v0.3.3
175
183
-->
176
184
185
+ * Returns: {Integer}
186
+
177
187
The ` os.freemem() ` method returns the amount of free system memory in bytes as
178
188
an integer.
179
189
@@ -182,6 +192,8 @@ an integer.
182
192
added: v2.3.0
183
193
-->
184
194
195
+ * Returns: {String}
196
+
185
197
The ` os.homedir() ` method returns the home directory of the current user as a
186
198
string.
187
199
@@ -190,6 +202,8 @@ string.
190
202
added: v0.3.3
191
203
-->
192
204
205
+ * Returns: {String}
206
+
193
207
The ` os.hostname() ` method returns the hostname of the operating system as a
194
208
string.
195
209
@@ -198,6 +212,8 @@ string.
198
212
added: v0.3.3
199
213
-->
200
214
215
+ * Returns: {Array}
216
+
201
217
The ` os.loadavg() ` method returns an array containing the 1, 5, and 15 minute
202
218
load averages.
203
219
@@ -213,6 +229,8 @@ Windows platforms. On Windows, the return value is always `[0, 0, 0]`.
213
229
added: v0.6.0
214
230
-->
215
231
232
+ * Returns: {Object}
233
+
216
234
The ` os.networkInterfaces() ` method returns an object containing only network
217
235
interfaces that have been assigned a network address.
218
236
@@ -272,6 +290,8 @@ The properties available on the assigned network address object include:
272
290
added: v0.5.0
273
291
-->
274
292
293
+ * Returns: {String}
294
+
275
295
The ` os.platform() ` method returns a string identifying the operating system
276
296
platform as set during compile time of Node.js.
277
297
@@ -296,6 +316,8 @@ to be experimental at this time.
296
316
added: v0.3.3
297
317
-->
298
318
319
+ * Returns: {String}
320
+
299
321
The ` os.release() ` method returns a string identifying the operating system
300
322
release.
301
323
@@ -308,6 +330,8 @@ https://en.wikipedia.org/wiki/Uname#Examples for more information.
308
330
added: v0.9.9
309
331
-->
310
332
333
+ * Returns: {String}
334
+
311
335
The ` os.tmpdir() ` method returns a string specifying the operating system's
312
336
default directory for temporary files.
313
337
@@ -316,6 +340,8 @@ default directory for temporary files.
316
340
added: v0.3.3
317
341
-->
318
342
343
+ * Returns: {Integer}
344
+
319
345
The ` os.totalmem() ` method returns the total amount of system memory in bytes
320
346
as an integer.
321
347
@@ -324,6 +350,8 @@ as an integer.
324
350
added: v0.3.3
325
351
-->
326
352
353
+ * Returns: {String}
354
+
327
355
The ` os.type() ` method returns a string identifying the operating system name
328
356
as returned by uname(3). For example ` 'Linux' ` on Linux, ` 'Darwin' ` on OS X and
329
357
` 'Windows_NT' ` on Windows.
@@ -336,6 +364,8 @@ information about the output of running uname(3) on various operating systems.
336
364
added: v0.3.3
337
365
-->
338
366
367
+ * Returns: {Integer}
368
+
339
369
The ` os.uptime() ` method returns the system uptime in number of seconds.
340
370
341
371
* Note* : Within Node.js' internals, this number is represented as a ` double ` .
@@ -351,6 +381,7 @@ added: v6.0.0
351
381
* ` encoding ` {String} Character encoding used to interpret resulting strings.
352
382
If ` encoding ` is set to ` 'buffer' ` , the ` username ` , ` shell ` , and ` homedir `
353
383
values will be ` Buffer ` instances. (Default: 'utf8')
384
+ * Returns: {Object}
354
385
355
386
The ` os.userInfo() ` method returns information about the currently effective
356
387
user -- on POSIX platforms, this is typically a subset of the password file. The
0 commit comments