| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 98b2eae commit d2a1a67
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -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 | ||
@@ -535,6 +541,8 @@ catch (err) { | |||
| 535 | 541 | added: v0.7.7 | |
| 536 | 542 | --> | |
| 537 | 543 | ||
| 544 | + * {Object} | ||
| 545 | + | ||
| 538 | 546 | The `process.config` property returns an Object containing the JavaScript | |
| 539 | 547 | representation of the configure options used to compile the current Node.js | |
| 540 | 548 | executable. This is the same as the `config.gypi` file that was produced when | |
@@ -578,6 +586,8 @@ replace the value of `process.config`. | |||
| 578 | 586 | added: v0.7.2 | |
| 579 | 587 | --> | |
| 580 | 588 | ||
| 589 | + * {Boolean} | ||
| 590 | + | ||
| 581 | 591 | If the Node.js process is spawned with an IPC channel (see the [Child Process][] | |
| 582 | 592 | and [Cluster][] documentation), the `process.connected` property will return | |
| 583 | 593 | `true` so long as the IPC channel is connected and will return `false` after | |
@@ -593,6 +603,9 @@ added: v6.1.0 | |||
| 593 | 603 | ||
| 594 | 604 | * `previousValue` {Object} A previous return value from calling | |
| 595 | 605 | `process.cpuUsage()` | |
| 606 | + * Return: {Object} | ||
| 607 | + * `user` {Integer} | ||
| 608 | + * `system` {Integer} | ||
| 596 | 609 | ||
| 597 | 610 | The `process.cpuUsage()` method returns the user and system CPU time usage of | |
| 598 | 611 | the current process, in an object with properties `user` and `system`, whose | |
@@ -620,6 +633,8 @@ console.log(process.cpuUsage(startUsage)); | |||
| 620 | 633 | added: v0.1.8 | |
| 621 | 634 | --> | |
| 622 | 635 | ||
| 636 | + * Return: {String} | ||
| 637 | + | ||
| 623 | 638 | The `process.cwd()` method returns the current working directory of the Node.js | |
| 624 | 639 | process. | |
| 625 | 640 | ||
@@ -648,6 +663,8 @@ If the Node.js process was not spawned with an IPC channel, | |||
| 648 | 663 | added: v0.1.27 | |
| 649 | 664 | --> | |
| 650 | 665 | ||
| 666 | + * {Object} | ||
| 667 | + | ||
| 651 | 668 | The `process.env` property returns an object containing the user environment. | |
| 652 | 669 | See environ(7). | |
| 653 | 670 | ||
@@ -812,6 +829,8 @@ emitMyWarning(); | |||
| 812 | 829 | added: v0.7.7 | |
| 813 | 830 | --> | |
| 814 | 831 | ||
| 832 | + * {Object} | ||
| 833 | + | ||
| 815 | 834 | The `process.execArgv` property returns the set of Node.js-specific command-line | |
| 816 | 835 | options passed when the Node.js process was launched. These options do not | |
| 817 | 836 | appear in the array returned by the [`process.argv`][] property, and do not | |
@@ -842,13 +861,15 @@ And `process.argv`: | |||
| 842 | 861 | added: v0.1.100 | |
| 843 | 862 | --> | |
| 844 | 863 | ||
| 864 | + * {String} | ||
| 865 | + | ||
| 845 | 866 | The `process.execPath` property returns the absolute pathname of the executable | |
| 846 | 867 | that started the Node.js process. | |
| 847 | 868 | ||
| 848 | 869 | For example: | |
| 849 | 870 | ||
| 850 | - ```sh | ||
| 851 | - /usr/local/bin/node | ||
| 871 | + ```js | ||
| 872 | + '/usr/local/bin/node' | ||
| 852 | 873 | ``` | |
| 853 | 874 | ||
| 854 | 875 | ||
@@ -921,6 +942,8 @@ is safer than calling `process.exit()`. | |||
| 921 | 942 | added: v0.11.8 | |
| 922 | 943 | --> | |
| 923 | 944 | ||
| 945 | + * {Integer} | ||
| 946 | + | ||
| 924 | 947 | A number which will be the process exit code, when the process either | |
| 925 | 948 | exits gracefully, or is exited via [`process.exit()`][] without specifying | |
| 926 | 949 | a code. | |
@@ -951,6 +974,8 @@ or Android) | |||
| 951 | 974 | added: v2.0.0 | |
| 952 | 975 | --> | |
| 953 | 976 | ||
| 977 | + * Return: {Object} | ||
| 978 | + | ||
| 954 | 979 | The `process.geteuid()` method returns the numerical effective user identity of | |
| 955 | 980 | the process. (See geteuid(2).) | |
| 956 | 981 | ||
@@ -968,6 +993,8 @@ Android) | |||
| 968 | 993 | added: v0.1.31 | |
| 969 | 994 | --> | |
| 970 | 995 | ||
| 996 | + * Return: {Object} | ||
| 997 | + | ||
| 971 | 998 | The `process.getgid()` method returns the numerical group identity of the | |
| 972 | 999 | process. (See getgid(2).) | |
| 973 | 1000 | ||
@@ -986,6 +1013,8 @@ Android) | |||
| 986 | 1013 | added: v0.9.4 | |
| 987 | 1014 | --> | |
| 988 | 1015 | ||
| 1016 | + * Return: {Array} | ||
| 1017 | + | ||
| 989 | 1018 | The `process.getgroups()` method returns an array with the supplementary group | |
| 990 | 1019 | IDs. POSIX leaves it unspecified if the effective group ID is included but | |
| 991 | 1020 | Node.js ensures it always is. | |
@@ -998,6 +1027,8 @@ Android) | |||
| 998 | 1027 | added: v0.1.28 | |
| 999 | 1028 | --> | |
| 1000 | 1029 | ||
| 1030 | + * Return: {Integer} | ||
| 1031 | + | ||
| 1001 | 1032 | The `process.getuid()` method returns the numeric user identity of the process. | |
| 1002 | 1033 | (See getuid(2).) | |
| 1003 | 1034 | ||
@@ -1130,6 +1161,11 @@ is no entry script. | |||
| 1130 | 1161 | added: v0.1.16 | |
| 1131 | 1162 | --> | |
| 1132 | 1163 | ||
| 1164 | + * Return: {Object} | ||
| 1165 | + * `rss` {Integer} | ||
| 1166 | + * `heapTotal` {Integer} | ||
| 1167 | + * `heapUsed` {Integer} | ||
| 1168 | + | ||
| 1133 | 1169 | The `process.memoryUsage()` method returns an object describing the memory usage | |
| 1134 | 1170 | of the Node.js process measured in bytes. | |
| 1135 | 1171 | ||
@@ -1247,6 +1283,8 @@ happening, just like a `while(true);` loop. | |||
| 1247 | 1283 | added: v0.1.15 | |
| 1248 | 1284 | --> | |
| 1249 | 1285 | ||
| 1286 | + * {Integer} | ||
| 1287 | + | ||
| 1250 | 1288 | The `process.pid` property returns the PID of the process. | |
| 1251 | 1289 | ||
| 1252 | 1290 | ```js | |
@@ -1258,6 +1296,8 @@ console.log(`This process is pid ${process.pid}`); | |||
| 1258 | 1296 | added: v0.1.16 | |
| 1259 | 1297 | --> | |
| 1260 | 1298 | ||
| 1299 | + * {String} | ||
| 1300 | + | ||
| 1261 | 1301 | The `process.platform` property returns a string identifying the operating | |
| 1262 | 1302 | system platform on which the Node.js process is running. For instance | |
| 1263 | 1303 | `'darwin'`, `'freebsd'`, `'linux'`, `'sunos'` or `'win32'` | |
@@ -1465,6 +1505,8 @@ Android) | |||
| 1465 | 1505 | ||
| 1466 | 1506 | ## process.stderr | |
| 1467 | 1507 | ||
| 1508 | + * {Stream} | ||
| 1509 | + | ||
| 1468 | 1510 | The `process.stderr` property returns a [Writable][] stream equivalent to or | |
| 1469 | 1511 | associated with `stderr` (fd `2`). | |
| 1470 | 1512 | ||
@@ -1485,6 +1527,8 @@ on `process.stderr`, `process.stdout`, or `process.stdin`: | |||
| 1485 | 1527 | ||
| 1486 | 1528 | ## process.stdin | |
| 1487 | 1529 | ||
| 1530 | + * {Stream} | ||
| 1531 | + | ||
| 1488 | 1532 | The `process.stdin` property returns a [Readable][] stream equivalent to or | |
| 1489 | 1533 | associated with `stdin` (fd `0`). | |
| 1490 | 1534 | ||
@@ -1515,6 +1559,8 @@ must call `process.stdin.resume()` to read from it. Note also that calling | |||
| 1515 | 1559 | ||
| 1516 | 1560 | ## process.stdout | |
| 1517 | 1561 | ||
| 1562 | + * {Stream} | ||
| 1563 | + | ||
| 1518 | 1564 | The `process.stdout` property returns a [Writable][] stream equivalent to or | |
| 1519 | 1565 | associated with `stdout` (fd `1`). | |
| 1520 | 1566 | ||
@@ -1570,6 +1616,8 @@ See the [TTY][] documentation for more information. | |||
| 1570 | 1616 | added: v0.1.104 | |
| 1571 | 1617 | --> | |
| 1572 | 1618 | ||
| 1619 | + * {String} | ||
| 1620 | + | ||
| 1573 | 1621 | The `process.title` property returns the current process title (i.e. returns | |
| 1574 | 1622 | the current value of `ps`). Assigning a new value to `process.title` modifies | |
| 1575 | 1623 | the current value of `ps`. | |
@@ -1609,6 +1657,8 @@ console.log( | |||
| 1609 | 1657 | added: v0.5.0 | |
| 1610 | 1658 | --> | |
| 1611 | 1659 | ||
| 1660 | + * Return: {Number} | ||
| 1661 | + | ||
| 1612 | 1662 | The `process.uptime()` method returns the number of seconds the current Node.js | |
| 1613 | 1663 | process has been running. | |
| 1614 | 1664 | ||
@@ -1617,6 +1667,8 @@ process has been running. | |||
| 1617 | 1667 | added: v0.1.3 | |
| 1618 | 1668 | --> | |
| 1619 | 1669 | ||
| 1670 | + * {String} | ||
| 1671 | + | ||
| 1620 | 1672 | The `process.version` property returns the Node.js version string. | |
| 1621 | 1673 | ||
| 1622 | 1674 | ```js | |
@@ -1628,6 +1680,8 @@ console.log(`Version: ${process.version}`); | |||
| 1628 | 1680 | added: v0.2.0 | |
| 1629 | 1681 | --> | |
| 1630 | 1682 | ||
| 1683 | + * {Object} | ||
| 1684 | + | ||
| 1631 | 1685 | The `process.versions` property returns an object listing the version strings of | |
| 1632 | 1686 | Node.js and its dependencies. | |
| 1633 | 1687 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments