@@ -447,6 +447,8 @@ generate a core file.
447
447
added: v0.5.0
448
448
-->
449
449
450
+ * {String}
451
+
450
452
The ` process.arch ` property returns a String identifying the processor
451
453
architecture that the Node.js process is currently running on. For instance
452
454
` 'arm' ` , ` 'ia32' ` , or ` 'x64' ` .
@@ -460,6 +462,8 @@ console.log(`This processor architecture is ${process.arch}`);
460
462
added: v0.1.27
461
463
-->
462
464
465
+ * {Array}
466
+
463
467
The ` process.argv ` property returns an array containing the command line
464
468
arguments passed when the Node.js process was launched. The first element will
465
469
be [ ` process.execPath ` ] . See ` process.argv0 ` if access to the original value of
@@ -497,6 +501,8 @@ Would generate the output:
497
501
added: 6.4.0
498
502
-->
499
503
504
+ * {String}
505
+
500
506
The ` process.argv0 ` property stores a read-only copy of the original value of
501
507
` argv[0] ` passed when Node.js starts.
502
508
@@ -545,6 +551,8 @@ catch (err) {
545
551
added: v0.7.7
546
552
-->
547
553
554
+ * {Object}
555
+
548
556
The ` process.config ` property returns an Object containing the JavaScript
549
557
representation of the configure options used to compile the current Node.js
550
558
executable. This is the same as the ` config.gypi ` file that was produced when
@@ -588,6 +596,8 @@ replace the value of `process.config`.
588
596
added: v0.7.2
589
597
-->
590
598
599
+ * {Boolean}
600
+
591
601
If the Node.js process is spawned with an IPC channel (see the [ Child Process] [ ]
592
602
and [ Cluster] [ ] documentation), the ` process.connected ` property will return
593
603
` true ` so long as the IPC channel is connected and will return ` false ` after
@@ -603,6 +613,9 @@ added: v6.1.0
603
613
604
614
* ` previousValue ` {Object} A previous return value from calling
605
615
` process.cpuUsage() `
616
+ * Return: {Object}
617
+ * ` user ` {Integer}
618
+ * ` system ` {Integer}
606
619
607
620
The ` process.cpuUsage() ` method returns the user and system CPU time usage of
608
621
the current process, in an object with properties ` user ` and ` system ` , whose
@@ -630,6 +643,8 @@ console.log(process.cpuUsage(startUsage));
630
643
added: v0.1.8
631
644
-->
632
645
646
+ * Return: {String}
647
+
633
648
The ` process.cwd() ` method returns the current working directory of the Node.js
634
649
process.
635
650
@@ -658,6 +673,8 @@ If the Node.js process was not spawned with an IPC channel,
658
673
added: v0.1.27
659
674
-->
660
675
676
+ * {Object}
677
+
661
678
The ` process.env ` property returns an object containing the user environment.
662
679
See environ(7).
663
680
@@ -822,6 +839,8 @@ emitMyWarning();
822
839
added: v0.7.7
823
840
-->
824
841
842
+ * {Object}
843
+
825
844
The ` process.execArgv ` property returns the set of Node.js-specific command-line
826
845
options passed when the Node.js process was launched. These options do not
827
846
appear in the array returned by the [ ` process.argv ` ] [ ] property, and do not
@@ -852,13 +871,15 @@ And `process.argv`:
852
871
added: v0.1.100
853
872
-->
854
873
874
+ * {String}
875
+
855
876
The ` process.execPath ` property returns the absolute pathname of the executable
856
877
that started the Node.js process.
857
878
858
879
For example:
859
880
860
- ``` sh
861
- /usr/local/bin/node
881
+ ``` js
882
+ ' /usr/local/bin/node'
862
883
```
863
884
864
885
@@ -931,6 +952,8 @@ is safer than calling `process.exit()`.
931
952
added: v0.11.8
932
953
-->
933
954
955
+ * {Integer}
956
+
934
957
A number which will be the process exit code, when the process either
935
958
exits gracefully, or is exited via [ ` process.exit() ` ] [ ] without specifying
936
959
a code.
@@ -961,6 +984,8 @@ or Android)
961
984
added: v2.0.0
962
985
-->
963
986
987
+ * Return: {Object}
988
+
964
989
The ` process.geteuid() ` method returns the numerical effective user identity of
965
990
the process. (See geteuid(2).)
966
991
@@ -978,6 +1003,8 @@ Android)
978
1003
added: v0.1.31
979
1004
-->
980
1005
1006
+ * Return: {Object}
1007
+
981
1008
The ` process.getgid() ` method returns the numerical group identity of the
982
1009
process. (See getgid(2).)
983
1010
@@ -996,6 +1023,8 @@ Android)
996
1023
added: v0.9.4
997
1024
-->
998
1025
1026
+ * Return: {Array}
1027
+
999
1028
The ` process.getgroups() ` method returns an array with the supplementary group
1000
1029
IDs. POSIX leaves it unspecified if the effective group ID is included but
1001
1030
Node.js ensures it always is.
@@ -1008,6 +1037,8 @@ Android)
1008
1037
added: v0.1.28
1009
1038
-->
1010
1039
1040
+ * Return: {Integer}
1041
+
1011
1042
The ` process.getuid() ` method returns the numeric user identity of the process.
1012
1043
(See getuid(2).)
1013
1044
@@ -1140,6 +1171,11 @@ is no entry script.
1140
1171
added: v0.1.16
1141
1172
-->
1142
1173
1174
+ * Return: {Object}
1175
+ * ` rss ` {Integer}
1176
+ * ` heapTotal ` {Integer}
1177
+ * ` heapUsed ` {Integer}
1178
+
1143
1179
The ` process.memoryUsage() ` method returns an object describing the memory usage
1144
1180
of the Node.js process measured in bytes.
1145
1181
@@ -1259,6 +1295,8 @@ happening, just like a `while(true);` loop.
1259
1295
added: v0.1.15
1260
1296
-->
1261
1297
1298
+ * {Integer}
1299
+
1262
1300
The ` process.pid ` property returns the PID of the process.
1263
1301
1264
1302
``` js
@@ -1270,6 +1308,8 @@ console.log(`This process is pid ${process.pid}`);
1270
1308
added: v0.1.16
1271
1309
-->
1272
1310
1311
+ * {String}
1312
+
1273
1313
The ` process.platform ` property returns a string identifying the operating
1274
1314
system platform on which the Node.js process is running. For instance
1275
1315
` 'darwin' ` , ` 'freebsd' ` , ` 'linux' ` , ` 'sunos' ` or ` 'win32' `
@@ -1471,6 +1511,8 @@ Android)
1471
1511
1472
1512
## process.stderr
1473
1513
1514
+ * {Stream}
1515
+
1474
1516
The ` process.stderr ` property returns a [ Writable] [ ] stream equivalent to or
1475
1517
associated with ` stderr ` (fd ` 2 ` ).
1476
1518
@@ -1491,6 +1533,8 @@ on `process.stderr`, `process.stdout`, or `process.stdin`:
1491
1533
1492
1534
## process.stdin
1493
1535
1536
+ * {Stream}
1537
+
1494
1538
The ` process.stdin ` property returns a [ Readable] [ ] stream equivalent to or
1495
1539
associated with ` stdin ` (fd ` 0 ` ).
1496
1540
@@ -1521,6 +1565,8 @@ must call `process.stdin.resume()` to read from it. Note also that calling
1521
1565
1522
1566
## process.stdout
1523
1567
1568
+ * {Stream}
1569
+
1524
1570
The ` process.stdout ` property returns a [ Writable] [ ] stream equivalent to or
1525
1571
associated with ` stdout ` (fd ` 1 ` ).
1526
1572
@@ -1576,6 +1622,8 @@ See the [TTY][] documentation for more information.
1576
1622
added: v0.1.104
1577
1623
-->
1578
1624
1625
+ * {String}
1626
+
1579
1627
The ` process.title ` property returns the current process title (i.e. returns
1580
1628
the current value of ` ps ` ). Assigning a new value to ` process.title ` modifies
1581
1629
the current value of ` ps ` .
@@ -1615,6 +1663,8 @@ console.log(
1615
1663
added: v0.5.0
1616
1664
-->
1617
1665
1666
+ * Return: {Number}
1667
+
1618
1668
The ` process.uptime() ` method returns the number of seconds the current Node.js
1619
1669
process has been running.
1620
1670
@@ -1623,6 +1673,8 @@ process has been running.
1623
1673
added: v0.1.3
1624
1674
-->
1625
1675
1676
+ * {String}
1677
+
1626
1678
The ` process.version ` property returns the Node.js version string.
1627
1679
1628
1680
``` js
@@ -1634,6 +1686,8 @@ console.log(`Version: ${process.version}`);
1634
1686
added: v0.2.0
1635
1687
-->
1636
1688
1689
+ * {Object}
1690
+
1637
1691
The ` process.versions ` property returns an object listing the version strings of
1638
1692
Node.js and its dependencies.
1639
1693
0 commit comments