{
  "type": "module",
  "source": "doc/api/process.md",
  "globals": [
    {
      "textRaw": "Process",
      "name": "Process",
      "introduced_in": "v0.10.0",
      "type": "global",
      "desc": "<p>The <code>process</code> object provides information about, and control over, the current\nNode.js process.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n</code></pre>\n<pre><code class=\"language-cjs\">const process = require('node:process');\n</code></pre>",
      "modules": [
        {
          "textRaw": "Process events",
          "name": "process_events",
          "type": "module",
          "desc": "<p>The <code>process</code> object is an instance of <a href=\"events.html#class-eventemitter\"><code>EventEmitter</code></a>.</p>",
          "events": [
            {
              "textRaw": "Event: `'beforeExit'`",
              "name": "beforeExit",
              "type": "event",
              "meta": {
                "added": [
                  "v0.11.12"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>The <code>'beforeExit'</code> event is emitted when Node.js empties its event loop and has\nno additional work to schedule. Normally, the Node.js process will exit when\nthere is no work scheduled, but a listener registered on the <code>'beforeExit'</code>\nevent can make asynchronous calls, and thereby cause the Node.js process to\ncontinue.</p>\n<p>The listener callback function is invoked with the value of\n<a href=\"#processexitcode_1\"><code>process.exitCode</code></a> passed as the only argument.</p>\n<p>The <code>'beforeExit'</code> event is <em>not</em> emitted for conditions causing explicit\ntermination, such as calling <a href=\"#processexitcode\"><code>process.exit()</code></a> or uncaught exceptions.</p>\n<p>The <code>'beforeExit'</code> should <em>not</em> be used as an alternative to the <code>'exit'</code> event\nunless the intention is to schedule additional work.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.on('beforeExit', (code) => {\n  console.log('Process beforeExit event with code: ', code);\n});\n\nprocess.on('exit', (code) => {\n  console.log('Process exit event with code: ', code);\n});\n\nconsole.log('This message is displayed first.');\n\n// Prints:\n// This message is displayed first.\n// Process beforeExit event with code: 0\n// Process exit event with code: 0\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('beforeExit', (code) => {\n  console.log('Process beforeExit event with code: ', code);\n});\n\nprocess.on('exit', (code) => {\n  console.log('Process exit event with code: ', code);\n});\n\nconsole.log('This message is displayed first.');\n\n// Prints:\n// This message is displayed first.\n// Process beforeExit event with code: 0\n// Process exit event with code: 0\n</code></pre>"
            },
            {
              "textRaw": "Event: `'disconnect'`",
              "name": "disconnect",
              "type": "event",
              "meta": {
                "added": [
                  "v0.7.7"
                ],
                "changes": []
              },
              "params": [],
              "desc": "<p>If the Node.js process is spawned with an IPC channel (see the <a href=\"child_process.html\">Child Process</a>\nand <a href=\"cluster.html\">Cluster</a> documentation), the <code>'disconnect'</code> event will be emitted when\nthe IPC channel is closed.</p>"
            },
            {
              "textRaw": "Event: `'exit'`",
              "name": "exit",
              "type": "event",
              "meta": {
                "added": [
                  "v0.1.7"
                ],
                "changes": []
              },
              "params": [
                {
                  "textRaw": "`code` {integer}",
                  "name": "code",
                  "type": "integer"
                }
              ],
              "desc": "<p>The <code>'exit'</code> event is emitted when the Node.js process is about to exit as a\nresult of either:</p>\n<ul>\n<li>The <code>process.exit()</code> method being called explicitly;</li>\n<li>The Node.js event loop no longer having any additional work to perform.</li>\n</ul>\n<p>There is no way to prevent the exiting of the event loop at this point, and once\nall <code>'exit'</code> listeners have finished running the Node.js process will terminate.</p>\n<p>The listener callback function is invoked with the exit code specified either\nby the <a href=\"#processexitcode_1\"><code>process.exitCode</code></a> property, or the <code>exitCode</code> argument passed to the\n<a href=\"#processexitcode\"><code>process.exit()</code></a> method.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.on('exit', (code) => {\n  console.log(`About to exit with code: ${code}`);\n});\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('exit', (code) => {\n  console.log(`About to exit with code: ${code}`);\n});\n</code></pre>\n<p>Listener functions <strong>must</strong> only perform <strong>synchronous</strong> operations. The Node.js\nprocess will exit immediately after calling the <code>'exit'</code> event listeners\ncausing any additional work still queued in the event loop to be abandoned.\nIn the following example, for instance, the timeout will never occur:</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.on('exit', (code) => {\n  setTimeout(() => {\n    console.log('This will not run');\n  }, 0);\n});\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('exit', (code) => {\n  setTimeout(() => {\n    console.log('This will not run');\n  }, 0);\n});\n</code></pre>"
            },
            {
              "textRaw": "Event: `'message'`",
              "name": "message",
              "type": "event",
              "meta": {
                "added": [
                  "v0.5.10"
                ],
                "changes": []
              },
              "params": [
                {
                  "textRaw": "`message` {Object|boolean|number|string|null} a parsed JSON object or a serializable primitive value.",
                  "name": "message",
                  "type": "Object|boolean|number|string|null",
                  "desc": "a parsed JSON object or a serializable primitive value."
                },
                {
                  "textRaw": "`sendHandle` {net.Server|net.Socket} a `net.Server` or `net.Socket` object, or undefined.",
                  "name": "sendHandle",
                  "type": "net.Server|net.Socket",
                  "desc": "a `net.Server` or `net.Socket` object, or undefined."
                }
              ],
              "desc": "<p>If the Node.js process is spawned with an IPC channel (see the <a href=\"child_process.html\">Child Process</a>\nand <a href=\"cluster.html\">Cluster</a> documentation), the <code>'message'</code> event is emitted whenever a\nmessage sent by a parent process using <a href=\"child_process.html#subprocesssendmessage-sendhandle-options-callback\"><code>childprocess.send()</code></a> is received by\nthe child process.</p>\n<p>The message goes through serialization and parsing. The resulting message might\nnot be the same as what is originally sent.</p>\n<p>If the <code>serialization</code> option was set to <code>advanced</code> used when spawning the\nprocess, the <code>message</code> argument can contain data that JSON is not able\nto represent.\nSee <a href=\"child_process.html#advanced-serialization\">Advanced serialization for <code>child_process</code></a> for more details.</p>"
            },
            {
              "textRaw": "Event: `'rejectionHandled'`",
              "name": "rejectionHandled",
              "type": "event",
              "meta": {
                "added": [
                  "v1.4.1"
                ],
                "changes": []
              },
              "params": [
                {
                  "textRaw": "`promise` {Promise} The late handled promise.",
                  "name": "promise",
                  "type": "Promise",
                  "desc": "The late handled promise."
                }
              ],
              "desc": "<p>The <code>'rejectionHandled'</code> event is emitted whenever a <code>Promise</code> has been rejected\nand an error handler was attached to it (using <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch\"><code>promise.catch()</code></a>, for\nexample) later than one turn of the Node.js event loop.</p>\n<p>The <code>Promise</code> object would have previously been emitted in an\n<code>'unhandledRejection'</code> event, but during the course of processing gained a\nrejection handler.</p>\n<p>There is no notion of a top level for a <code>Promise</code> chain at which rejections can\nalways be handled. Being inherently asynchronous in nature, a <code>Promise</code>\nrejection can be handled at a future point in time, possibly much later than\nthe event loop turn it takes for the <code>'unhandledRejection'</code> event to be emitted.</p>\n<p>Another way of stating this is that, unlike in synchronous code where there is\nan ever-growing list of unhandled exceptions, with Promises there can be a\ngrowing-and-shrinking list of unhandled rejections.</p>\n<p>In synchronous code, the <code>'uncaughtException'</code> event is emitted when the list of\nunhandled exceptions grows.</p>\n<p>In asynchronous code, the <code>'unhandledRejection'</code> event is emitted when the list\nof unhandled rejections grows, and the <code>'rejectionHandled'</code> event is emitted\nwhen the list of unhandled rejections shrinks.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nconst unhandledRejections = new Map();\nprocess.on('unhandledRejection', (reason, promise) => {\n  unhandledRejections.set(promise, reason);\n});\nprocess.on('rejectionHandled', (promise) => {\n  unhandledRejections.delete(promise);\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const unhandledRejections = new Map();\nprocess.on('unhandledRejection', (reason, promise) => {\n  unhandledRejections.set(promise, reason);\n});\nprocess.on('rejectionHandled', (promise) => {\n  unhandledRejections.delete(promise);\n});\n</code></pre>\n<p>In this example, the <code>unhandledRejections</code> <code>Map</code> will grow and shrink over time,\nreflecting rejections that start unhandled and then become handled. It is\npossible to record such errors in an error log, either periodically (which is\nlikely best for long-running application) or upon process exit (which is likely\nmost convenient for scripts).</p>"
            },
            {
              "textRaw": "Event: `'workerMessage'`",
              "name": "workerMessage",
              "type": "event",
              "meta": {
                "added": [
                  "v22.5.0",
                  "v20.19.0"
                ],
                "changes": []
              },
              "params": [
                {
                  "textRaw": "`value` {any} A value transmitted using `postMessageToThread()`.",
                  "name": "value",
                  "type": "any",
                  "desc": "A value transmitted using `postMessageToThread()`."
                },
                {
                  "textRaw": "`source` {number} The transmitting worker thread ID or `0` for the main thread.",
                  "name": "source",
                  "type": "number",
                  "desc": "The transmitting worker thread ID or `0` for the main thread."
                }
              ],
              "desc": "<p>The <code>'workerMessage'</code> event is emitted for any incoming message send by the other\nparty by using <a href=\"worker_threads.html#worker_threadspostmessagetothreadthreadid-value-transferlist-timeout\"><code>postMessageToThread()</code></a>.</p>"
            },
            {
              "textRaw": "Event: `'uncaughtException'`",
              "name": "uncaughtException",
              "type": "event",
              "meta": {
                "added": [
                  "v0.1.18"
                ],
                "changes": [
                  {
                    "version": [
                      "v12.0.0",
                      "v10.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/26599",
                    "description": "Added the `origin` argument."
                  }
                ]
              },
              "params": [
                {
                  "textRaw": "`err` {Error} The uncaught exception.",
                  "name": "err",
                  "type": "Error",
                  "desc": "The uncaught exception."
                },
                {
                  "textRaw": "`origin` {string} Indicates if the exception originates from an unhandled rejection or from a synchronous error. Can either be `'uncaughtException'` or `'unhandledRejection'`. The latter is used when an exception happens in a `Promise` based async context (or if a `Promise` is rejected) and `--unhandled-rejections` flag set to `strict` or `throw` (which is the default) and the rejection is not handled, or when a rejection happens during the command line entry point's ES module static loading phase.",
                  "name": "origin",
                  "type": "string",
                  "desc": "Indicates if the exception originates from an unhandled rejection or from a synchronous error. Can either be `'uncaughtException'` or `'unhandledRejection'`. The latter is used when an exception happens in a `Promise` based async context (or if a `Promise` is rejected) and `--unhandled-rejections` flag set to `strict` or `throw` (which is the default) and the rejection is not handled, or when a rejection happens during the command line entry point's ES module static loading phase."
                }
              ],
              "desc": "<p>The <code>'uncaughtException'</code> event is emitted when an uncaught JavaScript\nexception bubbles all the way back to the event loop. By default, Node.js\nhandles such exceptions by printing the stack trace to <code>stderr</code> and exiting\nwith code 1, overriding any previously set <a href=\"#processexitcode_1\"><code>process.exitCode</code></a>.\nAdding a handler for the <code>'uncaughtException'</code> event overrides this default\nbehavior. Alternatively, change the <a href=\"#processexitcode_1\"><code>process.exitCode</code></a> in the\n<code>'uncaughtException'</code> handler which will result in the process exiting with the\nprovided exit code. Otherwise, in the presence of such handler the process will\nexit with 0.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\nimport fs from 'node:fs';\n\nprocess.on('uncaughtException', (err, origin) => {\n  fs.writeSync(\n    process.stderr.fd,\n    `Caught exception: ${err}\\n` +\n    `Exception origin: ${origin}\\n`,\n  );\n});\n\nsetTimeout(() => {\n  console.log('This will still run.');\n}, 500);\n\n// Intentionally cause an exception, but don't catch it.\nnonexistentFunc();\nconsole.log('This will not run.');\n</code></pre>\n<pre><code class=\"language-cjs\">const fs = require('node:fs');\n\nprocess.on('uncaughtException', (err, origin) => {\n  fs.writeSync(\n    process.stderr.fd,\n    `Caught exception: ${err}\\n` +\n    `Exception origin: ${origin}\\n`,\n  );\n});\n\nsetTimeout(() => {\n  console.log('This will still run.');\n}, 500);\n\n// Intentionally cause an exception, but don't catch it.\nnonexistentFunc();\nconsole.log('This will not run.');\n</code></pre>\n<p>It is possible to monitor <code>'uncaughtException'</code> events without overriding the\ndefault behavior to exit the process by installing a\n<code>'uncaughtExceptionMonitor'</code> listener.</p>",
              "modules": [
                {
                  "textRaw": "Warning: Using `'uncaughtException'` correctly",
                  "name": "warning:_using_`'uncaughtexception'`_correctly",
                  "type": "module",
                  "desc": "<p><code>'uncaughtException'</code> is a crude mechanism for exception handling\nintended to be used only as a last resort. The event <em>should not</em> be used as\nan equivalent to <code>On Error Resume Next</code>. Unhandled exceptions inherently mean\nthat an application is in an undefined state. Attempting to resume application\ncode without properly recovering from the exception can cause additional\nunforeseen and unpredictable issues.</p>\n<p>Exceptions thrown from within the event handler will not be caught. Instead the\nprocess will exit with a non-zero exit code and the stack trace will be printed.\nThis is to avoid infinite recursion.</p>\n<p>Attempting to resume normally after an uncaught exception can be similar to\npulling out the power cord when upgrading a computer. Nine out of ten\ntimes, nothing happens. But the tenth time, the system becomes corrupted.</p>\n<p>The correct use of <code>'uncaughtException'</code> is to perform synchronous cleanup\nof allocated resources (e.g. file descriptors, handles, etc) before shutting\ndown the process. <strong>It is not safe to resume normal operation after\n<code>'uncaughtException'</code>.</strong></p>\n<p>To restart a crashed application in a more reliable way, whether\n<code>'uncaughtException'</code> is emitted or not, an external monitor should be employed\nin a separate process to detect application failures and recover or restart as\nneeded.</p>",
                  "displayName": "Warning: Using `'uncaughtException'` correctly"
                }
              ]
            },
            {
              "textRaw": "Event: `'uncaughtExceptionMonitor'`",
              "name": "uncaughtExceptionMonitor",
              "type": "event",
              "meta": {
                "added": [
                  "v13.7.0",
                  "v12.17.0"
                ],
                "changes": []
              },
              "params": [
                {
                  "textRaw": "`err` {Error} The uncaught exception.",
                  "name": "err",
                  "type": "Error",
                  "desc": "The uncaught exception."
                },
                {
                  "textRaw": "`origin` {string} Indicates if the exception originates from an unhandled rejection or from synchronous errors. Can either be `'uncaughtException'` or `'unhandledRejection'`. The latter is used when an exception happens in a `Promise` based async context (or if a `Promise` is rejected) and `--unhandled-rejections` flag set to `strict` or `throw` (which is the default) and the rejection is not handled, or when a rejection happens during the command line entry point's ES module static loading phase.",
                  "name": "origin",
                  "type": "string",
                  "desc": "Indicates if the exception originates from an unhandled rejection or from synchronous errors. Can either be `'uncaughtException'` or `'unhandledRejection'`. The latter is used when an exception happens in a `Promise` based async context (or if a `Promise` is rejected) and `--unhandled-rejections` flag set to `strict` or `throw` (which is the default) and the rejection is not handled, or when a rejection happens during the command line entry point's ES module static loading phase."
                }
              ],
              "desc": "<p>The <code>'uncaughtExceptionMonitor'</code> event is emitted before an\n<code>'uncaughtException'</code> event is emitted or a hook installed via\n<a href=\"#processsetuncaughtexceptioncapturecallbackfn\"><code>process.setUncaughtExceptionCaptureCallback()</code></a> is called.</p>\n<p>Installing an <code>'uncaughtExceptionMonitor'</code> listener does not change the behavior\nonce an <code>'uncaughtException'</code> event is emitted. The process will\nstill crash if no <code>'uncaughtException'</code> listener is installed.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.on('uncaughtExceptionMonitor', (err, origin) => {\n  MyMonitoringTool.logSync(err, origin);\n});\n\n// Intentionally cause an exception, but don't catch it.\nnonexistentFunc();\n// Still crashes Node.js\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('uncaughtExceptionMonitor', (err, origin) => {\n  MyMonitoringTool.logSync(err, origin);\n});\n\n// Intentionally cause an exception, but don't catch it.\nnonexistentFunc();\n// Still crashes Node.js\n</code></pre>"
            },
            {
              "textRaw": "Event: `'unhandledRejection'`",
              "name": "unhandledRejection",
              "type": "event",
              "meta": {
                "added": [
                  "v1.4.1"
                ],
                "changes": [
                  {
                    "version": "v7.0.0",
                    "pr-url": "https://github.com/nodejs/node/pull/8217",
                    "description": "Not handling `Promise` rejections is deprecated."
                  },
                  {
                    "version": "v6.6.0",
                    "pr-url": "https://github.com/nodejs/node/pull/8223",
                    "description": "Unhandled `Promise` rejections will now emit a process warning."
                  }
                ]
              },
              "params": [
                {
                  "textRaw": "`reason` {Error|any} The object with which the promise was rejected (typically an `Error` object).",
                  "name": "reason",
                  "type": "Error|any",
                  "desc": "The object with which the promise was rejected (typically an `Error` object)."
                },
                {
                  "textRaw": "`promise` {Promise} The rejected promise.",
                  "name": "promise",
                  "type": "Promise",
                  "desc": "The rejected promise."
                }
              ],
              "desc": "<p>The <code>'unhandledRejection'</code> event is emitted whenever a <code>Promise</code> is rejected and\nno error handler is attached to the promise within a turn of the event loop.\nWhen programming with Promises, exceptions are encapsulated as \"rejected\npromises\". Rejections can be caught and handled using <a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch\"><code>promise.catch()</code></a> and\nare propagated through a <code>Promise</code> chain. The <code>'unhandledRejection'</code> event is\nuseful for detecting and keeping track of promises that were rejected whose\nrejections have not yet been handled.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.on('unhandledRejection', (reason, promise) => {\n  console.log('Unhandled Rejection at:', promise, 'reason:', reason);\n  // Application specific logging, throwing an error, or other logic here\n});\n\nsomePromise.then((res) => {\n  return reportToUser(JSON.pasre(res)); // Note the typo (`pasre`)\n}); // No `.catch()` or `.then()`\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('unhandledRejection', (reason, promise) => {\n  console.log('Unhandled Rejection at:', promise, 'reason:', reason);\n  // Application specific logging, throwing an error, or other logic here\n});\n\nsomePromise.then((res) => {\n  return reportToUser(JSON.pasre(res)); // Note the typo (`pasre`)\n}); // No `.catch()` or `.then()`\n</code></pre>\n<p>The following will also trigger the <code>'unhandledRejection'</code> event to be\nemitted:</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nfunction SomeResource() {\n  // Initially set the loaded status to a rejected promise\n  this.loaded = Promise.reject(new Error('Resource not yet loaded!'));\n}\n\nconst resource = new SomeResource();\n// no .catch or .then on resource.loaded for at least a turn\n</code></pre>\n<pre><code class=\"language-cjs\">function SomeResource() {\n  // Initially set the loaded status to a rejected promise\n  this.loaded = Promise.reject(new Error('Resource not yet loaded!'));\n}\n\nconst resource = new SomeResource();\n// no .catch or .then on resource.loaded for at least a turn\n</code></pre>\n<p>In this example case, it is possible to track the rejection as a developer error\nas would typically be the case for other <code>'unhandledRejection'</code> events. To\naddress such failures, a non-operational\n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch\"><code>.catch(() => { })</code></a> handler may be attached to\n<code>resource.loaded</code>, which would prevent the <code>'unhandledRejection'</code> event from\nbeing emitted.</p>\n<p>If an <code>'unhandledRejection'</code> event is emitted but not handled it will\nbe raised as an uncaught exception. This alongside other behaviors of\n<code>'unhandledRejection'</code> events can changed via the <a href=\"cli.html#--unhandled-rejectionsmode\"><code>--unhandled-rejections</code></a> flag.</p>"
            },
            {
              "textRaw": "Event: `'warning'`",
              "name": "warning",
              "type": "event",
              "meta": {
                "added": [
                  "v6.0.0"
                ],
                "changes": []
              },
              "params": [
                {
                  "textRaw": "`warning` {Error} Key properties of the warning are:",
                  "name": "warning",
                  "type": "Error",
                  "desc": "Key properties of the warning are:",
                  "options": [
                    {
                      "textRaw": "`name` {string} The name of the warning. **Default:** `'Warning'`.",
                      "name": "name",
                      "type": "string",
                      "default": "`'Warning'`",
                      "desc": "The name of the warning."
                    },
                    {
                      "textRaw": "`message` {string} A system-provided description of the warning.",
                      "name": "message",
                      "type": "string",
                      "desc": "A system-provided description of the warning."
                    },
                    {
                      "textRaw": "`stack` {string} A stack trace to the location in the code where the warning was issued.",
                      "name": "stack",
                      "type": "string",
                      "desc": "A stack trace to the location in the code where the warning was issued."
                    }
                  ]
                }
              ],
              "desc": "<p>The <code>'warning'</code> event is emitted whenever Node.js emits a process warning.</p>\n<p>A process warning is similar to an error in that it describes exceptional\nconditions that are being brought to the user's attention. However, warnings\nare not part of the normal Node.js and JavaScript error handling flow.\nNode.js can emit warnings whenever it detects bad coding practices that could\nlead to sub-optimal application performance, bugs, or security vulnerabilities.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.on('warning', (warning) => {\n  console.warn(warning.name);    // Print the warning name\n  console.warn(warning.message); // Print the warning message\n  console.warn(warning.stack);   // Print the stack trace\n});\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('warning', (warning) => {\n  console.warn(warning.name);    // Print the warning name\n  console.warn(warning.message); // Print the warning message\n  console.warn(warning.stack);   // Print the stack trace\n});\n</code></pre>\n<p>By default, Node.js will print process warnings to <code>stderr</code>. The <code>--no-warnings</code>\ncommand-line option can be used to suppress the default console output but the\n<code>'warning'</code> event will still be emitted by the <code>process</code> object. Currently, it\nis not possible to suppress specific warning types other than deprecation\nwarnings. To suppress deprecation warnings, check out the <a href=\"cli.html#--no-deprecation\"><code>--no-deprecation</code></a>\nflag.</p>\n<p>The following example illustrates the warning that is printed to <code>stderr</code> when\ntoo many listeners have been added to an event:</p>\n<pre><code class=\"language-console\">$ node\n> events.defaultMaxListeners = 1;\n> process.on('foo', () => {});\n> process.on('foo', () => {});\n> (node:38638) MaxListenersExceededWarning: Possible EventEmitter memory leak\ndetected. 2 foo listeners added. Use emitter.setMaxListeners() to increase limit\n</code></pre>\n<p>In contrast, the following example turns off the default warning output and\nadds a custom handler to the <code>'warning'</code> event:</p>\n<pre><code class=\"language-console\">$ node --no-warnings\n> const p = process.on('warning', (warning) => console.warn('Do not do that!'));\n> events.defaultMaxListeners = 1;\n> process.on('foo', () => {});\n> process.on('foo', () => {});\n> Do not do that!\n</code></pre>\n<p>The <code>--trace-warnings</code> command-line option can be used to have the default\nconsole output for warnings include the full stack trace of the warning.</p>\n<p>Launching Node.js using the <code>--throw-deprecation</code> command-line flag will\ncause custom deprecation warnings to be thrown as exceptions.</p>\n<p>Using the <code>--trace-deprecation</code> command-line flag will cause the custom\ndeprecation to be printed to <code>stderr</code> along with the stack trace.</p>\n<p>Using the <code>--no-deprecation</code> command-line flag will suppress all reporting\nof the custom deprecation.</p>\n<p>The <code>*-deprecation</code> command-line flags only affect warnings that use the name\n<code>'DeprecationWarning'</code>.</p>",
              "modules": [
                {
                  "textRaw": "Emitting custom warnings",
                  "name": "emitting_custom_warnings",
                  "type": "module",
                  "desc": "<p>See the <a href=\"#processemitwarningwarning-type-code-ctor\"><code>process.emitWarning()</code></a> method for issuing\ncustom or application-specific warnings.</p>",
                  "displayName": "Emitting custom warnings"
                },
                {
                  "textRaw": "Node.js warning names",
                  "name": "node.js_warning_names",
                  "type": "module",
                  "desc": "<p>There are no strict guidelines for warning types (as identified by the <code>name</code>\nproperty) emitted by Node.js. New types of warnings can be added at any time.\nA few of the warning types that are most common include:</p>\n<ul>\n<li><code>'DeprecationWarning'</code> - Indicates use of a deprecated Node.js API or feature.\nSuch warnings must include a <code>'code'</code> property identifying the\n<a href=\"deprecations.html\">deprecation code</a>.</li>\n<li><code>'ExperimentalWarning'</code> - Indicates use of an experimental Node.js API or\nfeature. Such features must be used with caution as they may change at any\ntime and are not subject to the same strict semantic-versioning and long-term\nsupport policies as supported features.</li>\n<li><code>'MaxListenersExceededWarning'</code> - Indicates that too many listeners for a\ngiven event have been registered on either an <code>EventEmitter</code> or <code>EventTarget</code>.\nThis is often an indication of a memory leak.</li>\n<li><code>'TimeoutOverflowWarning'</code> - Indicates that a numeric value that cannot fit\nwithin a 32-bit signed integer has been provided to either the <code>setTimeout()</code>\nor <code>setInterval()</code> functions.</li>\n<li><code>'TimeoutNegativeWarning'</code> - Indicates that a negative number has provided to\neither the <code>setTimeout()</code> or <code>setInterval()</code> functions.</li>\n<li><code>'TimeoutNaNWarning'</code> - Indicates that a value which is not a number has\nprovided to either the <code>setTimeout()</code> or <code>setInterval()</code> functions.</li>\n<li><code>'UnsupportedWarning'</code> - Indicates use of an unsupported option or feature\nthat will be ignored rather than treated as an error. One example is use of\nthe HTTP response status message when using the HTTP/2 compatibility API.</li>\n</ul>",
                  "displayName": "Node.js warning names"
                }
              ]
            },
            {
              "textRaw": "Event: `'worker'`",
              "name": "worker",
              "type": "event",
              "meta": {
                "added": [
                  "v16.2.0",
                  "v14.18.0"
                ],
                "changes": []
              },
              "params": [
                {
                  "textRaw": "`worker` {Worker} The {Worker} that was created.",
                  "name": "worker",
                  "type": "Worker",
                  "desc": "The {Worker} that was created."
                }
              ],
              "desc": "<p>The <code>'worker'</code> event is emitted after a new <a href=\"worker_threads.html#class-worker\"><code>&#x3C;Worker></code></a> thread has been created.</p>"
            },
            {
              "textRaw": "Signal events",
              "name": "Signal events",
              "type": "event",
              "params": [],
              "desc": "<p>Signal events will be emitted when the Node.js process receives a signal. Please\nrefer to <a href=\"http://man7.org/linux/man-pages/man7/signal.7.html\"><code>signal(7)</code></a> for a listing of standard POSIX signal names such as <code>'SIGINT'</code>, <code>'SIGHUP'</code>, etc.</p>\n<p>Signals are not available on <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>\n<p>The signal handler will receive the signal's name (<code>'SIGINT'</code>,\n<code>'SIGTERM'</code>, etc.) as the first argument.</p>\n<p>The name of each event will be the uppercase common name for the signal (e.g.\n<code>'SIGINT'</code> for <code>SIGINT</code> signals).</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\n// Begin reading from stdin so the process does not exit.\nprocess.stdin.resume();\n\nprocess.on('SIGINT', () => {\n  console.log('Received SIGINT. Press Control-D to exit.');\n});\n\n// Using a single function to handle multiple signals\nfunction handle(signal) {\n  console.log(`Received ${signal}`);\n}\n\nprocess.on('SIGINT', handle);\nprocess.on('SIGTERM', handle);\n</code></pre>\n<pre><code class=\"language-cjs\">// Begin reading from stdin so the process does not exit.\nprocess.stdin.resume();\n\nprocess.on('SIGINT', () => {\n  console.log('Received SIGINT. Press Control-D to exit.');\n});\n\n// Using a single function to handle multiple signals\nfunction handle(signal) {\n  console.log(`Received ${signal}`);\n}\n\nprocess.on('SIGINT', handle);\nprocess.on('SIGTERM', handle);\n</code></pre>\n<ul>\n<li><code>'SIGUSR1'</code> is reserved by Node.js to start the <a href=\"debugger.html\">debugger</a>. It's possible to\ninstall a listener but doing so might interfere with the debugger.</li>\n<li><code>'SIGTERM'</code> and <code>'SIGINT'</code> have default handlers on non-Windows platforms that\nreset the terminal mode before exiting with code <code>128 + signal number</code>. If one\nof these signals has a listener installed, its default behavior will be\nremoved (Node.js will no longer exit).</li>\n<li><code>'SIGPIPE'</code> is ignored by default. It can have a listener installed.</li>\n<li><code>'SIGHUP'</code> is generated on Windows when the console window is closed, and on\nother platforms under various similar conditions. See <a href=\"http://man7.org/linux/man-pages/man7/signal.7.html\"><code>signal(7)</code></a>. It can have a\nlistener installed, however Node.js will be unconditionally terminated by\nWindows about 10 seconds later. On non-Windows platforms, the default\nbehavior of <code>SIGHUP</code> is to terminate Node.js, but once a listener has been\ninstalled its default behavior will be removed.</li>\n<li><code>'SIGTERM'</code> is not supported on Windows, it can be listened on.</li>\n<li><code>'SIGINT'</code> from the terminal is supported on all platforms, and can usually be\ngenerated with <kbd>Ctrl</kbd>+<kbd>C</kbd> (though this may be configurable).\nIt is not generated when <a href=\"tty.html#readstreamsetrawmodemode\">terminal raw mode</a> is enabled\nand <kbd>Ctrl</kbd>+<kbd>C</kbd> is used.</li>\n<li><code>'SIGBREAK'</code> is delivered on Windows when <kbd>Ctrl</kbd>+<kbd>Break</kbd> is\npressed. On non-Windows platforms, it can be listened on, but there is no way\nto send or generate it.</li>\n<li><code>'SIGWINCH'</code> is delivered when the console has been resized. On Windows, this\nwill only happen on write to the console when the cursor is being moved, or\nwhen a readable tty is used in raw mode.</li>\n<li><code>'SIGKILL'</code> cannot have a listener installed, it will unconditionally\nterminate Node.js on all platforms.</li>\n<li><code>'SIGSTOP'</code> cannot have a listener installed.</li>\n<li><code>'SIGBUS'</code>, <code>'SIGFPE'</code>, <code>'SIGSEGV'</code>, and <code>'SIGILL'</code>, when not raised\nartificially using <a href=\"http://man7.org/linux/man-pages/man2/kill.2.html\"><code>kill(2)</code></a>, inherently leave the process in a state from\nwhich it is not safe to call JS listeners. Doing so might cause the process\nto stop responding.</li>\n<li><code>0</code> can be sent to test for the existence of a process, it has no effect if\nthe process exists, but will throw an error if the process does not exist.</li>\n</ul>\n<p>Windows does not support signals so has no equivalent to termination by signal,\nbut Node.js offers some emulation with <a href=\"#processkillpid-signal\"><code>process.kill()</code></a>, and\n<a href=\"child_process.html#subprocesskillsignal\"><code>subprocess.kill()</code></a>:</p>\n<ul>\n<li>Sending <code>SIGINT</code>, <code>SIGTERM</code>, and <code>SIGKILL</code> will cause the unconditional\ntermination of the target process, and afterwards, subprocess will report that\nthe process was terminated by signal.</li>\n<li>Sending signal <code>0</code> can be used as a platform independent way to test for the\nexistence of a process.</li>\n</ul>"
            }
          ],
          "displayName": "Process events"
        },
        {
          "textRaw": "Exit codes",
          "name": "exit_codes",
          "type": "module",
          "desc": "<p>Node.js will normally exit with a <code>0</code> status code when no more async\noperations are pending. The following status codes are used in other\ncases:</p>\n<ul>\n<li><code>1</code> <strong>Uncaught Fatal Exception</strong>: There was an uncaught exception,\nand it was not handled by a domain or an <a href=\"#event-uncaughtexception\"><code>'uncaughtException'</code></a> event\nhandler.</li>\n<li><code>2</code>: Unused (reserved by Bash for builtin misuse)</li>\n<li><code>3</code> <strong>Internal JavaScript Parse Error</strong>: The JavaScript source code\ninternal in the Node.js bootstrapping process caused a parse error. This\nis extremely rare, and generally can only happen during development\nof Node.js itself.</li>\n<li><code>4</code> <strong>Internal JavaScript Evaluation Failure</strong>: The JavaScript\nsource code internal in the Node.js bootstrapping process failed to\nreturn a function value when evaluated. This is extremely rare, and\ngenerally can only happen during development of Node.js itself.</li>\n<li><code>5</code> <strong>Fatal Error</strong>: There was a fatal unrecoverable error in V8.\nTypically a message will be printed to stderr with the prefix <code>FATAL ERROR</code>.</li>\n<li><code>6</code> <strong>Non-function Internal Exception Handler</strong>: There was an\nuncaught exception, but the internal fatal exception handler\nfunction was somehow set to a non-function, and could not be called.</li>\n<li><code>7</code> <strong>Internal Exception Handler Run-Time Failure</strong>: There was an\nuncaught exception, and the internal fatal exception handler\nfunction itself threw an error while attempting to handle it. This\ncan happen, for example, if an <a href=\"#event-uncaughtexception\"><code>'uncaughtException'</code></a> or\n<code>domain.on('error')</code> handler throws an error.</li>\n<li><code>8</code>: Unused. In previous versions of Node.js, exit code 8 sometimes\nindicated an uncaught exception.</li>\n<li><code>9</code> <strong>Invalid Argument</strong>: Either an unknown option was specified,\nor an option requiring a value was provided without a value.</li>\n<li><code>10</code> <strong>Internal JavaScript Run-Time Failure</strong>: The JavaScript\nsource code internal in the Node.js bootstrapping process threw an error\nwhen the bootstrapping function was called. This is extremely rare,\nand generally can only happen during development of Node.js itself.</li>\n<li><code>12</code> <strong>Invalid Debug Argument</strong>: The <code>--inspect</code> and/or <code>--inspect-brk</code>\noptions were set, but the port number chosen was invalid or unavailable.</li>\n<li><code>13</code> <strong>Unsettled Top-Level Await</strong>: <code>await</code> was used outside of a function\nin the top-level code, but the passed <code>Promise</code> never settled.</li>\n<li><code>14</code> <strong>Snapshot Failure</strong>: Node.js was started to build a V8 startup\nsnapshot and it failed because certain requirements of the state of\nthe application were not met.</li>\n<li><code>>128</code> <strong>Signal Exits</strong>: If Node.js receives a fatal signal such as\n<code>SIGKILL</code> or <code>SIGHUP</code>, then its exit code will be <code>128</code> plus the\nvalue of the signal code. This is a standard POSIX practice, since\nexit codes are defined to be 7-bit integers, and signal exits set\nthe high-order bit, and then contain the value of the signal code.\nFor example, signal <code>SIGABRT</code> has value <code>6</code>, so the expected exit\ncode will be <code>128</code> + <code>6</code>, or <code>134</code>.</li>\n</ul>",
          "displayName": "Exit codes"
        }
      ],
      "methods": [
        {
          "textRaw": "`process.abort()`",
          "name": "abort",
          "type": "method",
          "meta": {
            "added": [
              "v0.7.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": []
            }
          ],
          "desc": "<p>The <code>process.abort()</code> method causes the Node.js process to exit immediately and\ngenerate a core file.</p>\n<p>This feature is not available in <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>"
        },
        {
          "textRaw": "`process.addUncaughtExceptionCaptureCallback(fn)`",
          "name": "addUncaughtExceptionCaptureCallback",
          "type": "method",
          "meta": {
            "added": [
              "v25.9.0"
            ],
            "changes": []
          },
          "stability": 1,
          "stabilityText": "Experimental",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fn` {Function}",
                  "name": "fn",
                  "type": "Function"
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.addUncaughtExceptionCaptureCallback()</code> function adds a callback\nthat will be invoked when an uncaught exception occurs, receiving the exception\nvalue as its first argument.</p>\n<p>Unlike <a href=\"#processsetuncaughtexceptioncapturecallbackfn\"><code>process.setUncaughtExceptionCaptureCallback()</code></a>, this function allows\nmultiple callbacks to be registered and does not conflict with the\n<a href=\"domain.html\"><code>domain</code></a> module. Callbacks are called in reverse order of registration\n(most recent first). If a callback returns <code>true</code>, subsequent callbacks\nand the default uncaught exception handling are skipped.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.addUncaughtExceptionCaptureCallback((err) => {\n  console.error('Caught exception:', err.message);\n  return true; // Indicates exception was handled\n});\n</code></pre>\n<pre><code class=\"language-cjs\">process.addUncaughtExceptionCaptureCallback((err) => {\n  console.error('Caught exception:', err.message);\n  return true; // Indicates exception was handled\n});\n</code></pre>"
        },
        {
          "textRaw": "`process.availableMemory()`",
          "name": "availableMemory",
          "type": "method",
          "meta": {
            "added": [
              "v22.0.0",
              "v20.13.0"
            ],
            "changes": [
              {
                "version": [
                  "v24.0.0",
                  "v22.16.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/57765",
                "description": "Change stability index for this feature from Experimental to Stable."
              }
            ]
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {number}",
                "name": "return",
                "type": "number"
              }
            }
          ],
          "desc": "<p>Gets the amount of free memory that is still available to the process\n(in bytes).</p>\n<p>See <a href=\"https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_available_memory\"><code>uv_get_available_memory</code></a> for more\ninformation.</p>"
        },
        {
          "textRaw": "`process.chdir(directory)`",
          "name": "chdir",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.17"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`directory` {string}",
                  "name": "directory",
                  "type": "string"
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.chdir()</code> method changes the current working directory of the\nNode.js process or throws an exception if doing so fails (for instance, if\nthe specified <code>directory</code> does not exist).</p>\n<pre><code class=\"language-mjs\">import { chdir, cwd } from 'node:process';\n\nconsole.log(`Starting directory: ${cwd()}`);\ntry {\n  chdir('/tmp');\n  console.log(`New directory: ${cwd()}`);\n} catch (err) {\n  console.error(`chdir: ${err}`);\n}\n</code></pre>\n<pre><code class=\"language-cjs\">const { chdir, cwd } = require('node:process');\n\nconsole.log(`Starting directory: ${cwd()}`);\ntry {\n  chdir('/tmp');\n  console.log(`New directory: ${cwd()}`);\n} catch (err) {\n  console.error(`chdir: ${err}`);\n}\n</code></pre>\n<p>This feature is not available in <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>"
        },
        {
          "textRaw": "`process.constrainedMemory()`",
          "name": "constrainedMemory",
          "type": "method",
          "meta": {
            "added": [
              "v19.6.0",
              "v18.15.0"
            ],
            "changes": [
              {
                "version": [
                  "v24.0.0",
                  "v22.16.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/57765",
                "description": "Change stability index for this feature from Experimental to Stable."
              },
              {
                "version": [
                  "v22.0.0",
                  "v20.13.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/52039",
                "description": "Aligned return value with `uv_get_constrained_memory`."
              }
            ]
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {number}",
                "name": "return",
                "type": "number"
              }
            }
          ],
          "desc": "<p>Gets the amount of memory available to the process (in bytes) based on\nlimits imposed by the OS. If there is no such constraint, or the constraint\nis unknown, <code>0</code> is returned.</p>\n<p>See <a href=\"https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory\"><code>uv_get_constrained_memory</code></a> for more\ninformation.</p>"
        },
        {
          "textRaw": "`process.cpuUsage([previousValue])`",
          "name": "cpuUsage",
          "type": "method",
          "meta": {
            "added": [
              "v6.1.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`previousValue` {Object} A previous return value from calling `process.cpuUsage()`",
                  "name": "previousValue",
                  "type": "Object",
                  "desc": "A previous return value from calling `process.cpuUsage()`",
                  "optional": true
                }
              ],
              "return": {
                "textRaw": "Returns: {Object}",
                "name": "return",
                "type": "Object",
                "options": [
                  {
                    "textRaw": "`user` {integer}",
                    "name": "user",
                    "type": "integer"
                  },
                  {
                    "textRaw": "`system` {integer}",
                    "name": "system",
                    "type": "integer"
                  }
                ]
              }
            }
          ],
          "desc": "<p>The <code>process.cpuUsage()</code> method returns the user and system CPU time usage of\nthe current process, in an object with properties <code>user</code> and <code>system</code>, whose\nvalues are microsecond values (millionth of a second). These values measure time\nspent in user and system code respectively, and may end up being greater than\nactual elapsed time if multiple CPU cores are performing work for this process.</p>\n<p>The result of a previous call to <code>process.cpuUsage()</code> can be passed as the\nargument to the function, to get a diff reading.</p>\n<pre><code class=\"language-mjs\">import { cpuUsage } from 'node:process';\n\nconst startUsage = cpuUsage();\n// { user: 38579, system: 6986 }\n\n// spin the CPU for 500 milliseconds\nconst now = Date.now();\nwhile (Date.now() - now &#x3C; 500);\n\nconsole.log(cpuUsage(startUsage));\n// { user: 514883, system: 11226 }\n</code></pre>\n<pre><code class=\"language-cjs\">const { cpuUsage } = require('node:process');\n\nconst startUsage = cpuUsage();\n// { user: 38579, system: 6986 }\n\n// spin the CPU for 500 milliseconds\nconst now = Date.now();\nwhile (Date.now() - now &#x3C; 500);\n\nconsole.log(cpuUsage(startUsage));\n// { user: 514883, system: 11226 }\n</code></pre>"
        },
        {
          "textRaw": "`process.cwd()`",
          "name": "cwd",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.8"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {string}",
                "name": "return",
                "type": "string"
              }
            }
          ],
          "desc": "<p>The <code>process.cwd()</code> method returns the current working directory of the Node.js\nprocess.</p>\n<pre><code class=\"language-mjs\">import { cwd } from 'node:process';\n\nconsole.log(`Current directory: ${cwd()}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { cwd } = require('node:process');\n\nconsole.log(`Current directory: ${cwd()}`);\n</code></pre>"
        },
        {
          "textRaw": "`process.disconnect()`",
          "name": "disconnect",
          "type": "method",
          "meta": {
            "added": [
              "v0.7.2"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": []
            }
          ],
          "desc": "<p>If the Node.js process is spawned with an IPC channel (see the <a href=\"child_process.html\">Child Process</a>\nand <a href=\"cluster.html\">Cluster</a> documentation), the <code>process.disconnect()</code> method will close the\nIPC channel to the parent process, allowing the child process to exit gracefully\nonce there are no other connections keeping it alive.</p>\n<p>The effect of calling <code>process.disconnect()</code> is the same as calling\n<a href=\"child_process.html#subprocessdisconnect\"><code>ChildProcess.disconnect()</code></a> from the parent process.</p>\n<p>If the Node.js process was not spawned with an IPC channel,\n<code>process.disconnect()</code> will be <code>undefined</code>.</p>"
        },
        {
          "textRaw": "`process.dlopen(module, filename[, flags])`",
          "name": "dlopen",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.16"
            ],
            "changes": [
              {
                "version": "v9.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/12794",
                "description": "Added support for the `flags` argument."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`module` {Object}",
                  "name": "module",
                  "type": "Object"
                },
                {
                  "textRaw": "`filename` {string}",
                  "name": "filename",
                  "type": "string"
                },
                {
                  "textRaw": "`flags` {os.constants.dlopen} **Default:** `os.constants.dlopen.RTLD_LAZY`",
                  "name": "flags",
                  "type": "os.constants.dlopen",
                  "default": "`os.constants.dlopen.RTLD_LAZY`",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.dlopen()</code> method allows dynamically loading shared objects. It is\nprimarily used by <code>require()</code> to load C++ Addons, and should not be used\ndirectly, except in special cases. In other words, <a href=\"globals.html#require\"><code>require()</code></a> should be\npreferred over <code>process.dlopen()</code> unless there are specific reasons such as\ncustom dlopen flags or loading from ES modules.</p>\n<p>The <code>flags</code> argument is an integer that allows to specify dlopen\nbehavior. See the <a href=\"os.html#dlopen-constants\"><code>os.constants.dlopen</code></a> documentation for details.</p>\n<p>An important requirement when calling <code>process.dlopen()</code> is that the <code>module</code>\ninstance must be passed. Functions exported by the C++ Addon are then\naccessible via <code>module.exports</code>.</p>\n<p>The example below shows how to load a C++ Addon, named <code>local.node</code>,\nthat exports a <code>foo</code> function. All the symbols are loaded before\nthe call returns, by passing the <code>RTLD_NOW</code> constant. In this example\nthe constant is assumed to be available.</p>\n<pre><code class=\"language-mjs\">import { dlopen } from 'node:process';\nimport { constants } from 'node:os';\nimport { fileURLToPath } from 'node:url';\n\nconst module = { exports: {} };\ndlopen(module, fileURLToPath(new URL('local.node', import.meta.url)),\n       constants.dlopen.RTLD_NOW);\nmodule.exports.foo();\n</code></pre>\n<pre><code class=\"language-cjs\">const { dlopen } = require('node:process');\nconst { constants } = require('node:os');\nconst { join } = require('node:path');\n\nconst module = { exports: {} };\ndlopen(module, join(__dirname, 'local.node'), constants.dlopen.RTLD_NOW);\nmodule.exports.foo();\n</code></pre>"
        },
        {
          "textRaw": "`process.emitWarning(warning[, options])`",
          "name": "emitWarning",
          "type": "method",
          "meta": {
            "added": [
              "v8.0.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`warning` {string|Error} The warning to emit.",
                  "name": "warning",
                  "type": "string|Error",
                  "desc": "The warning to emit."
                },
                {
                  "textRaw": "`options` {Object}",
                  "name": "options",
                  "type": "Object",
                  "options": [
                    {
                      "textRaw": "`type` {string} When `warning` is a `String`, `type` is the name to use for the _type_ of warning being emitted. **Default:** `'Warning'`.",
                      "name": "type",
                      "type": "string",
                      "default": "`'Warning'`",
                      "desc": "When `warning` is a `String`, `type` is the name to use for the _type_ of warning being emitted."
                    },
                    {
                      "textRaw": "`code` {string} A unique identifier for the warning instance being emitted.",
                      "name": "code",
                      "type": "string",
                      "desc": "A unique identifier for the warning instance being emitted."
                    },
                    {
                      "textRaw": "`ctor` {Function} When `warning` is a `String`, `ctor` is an optional function used to limit the generated stack trace. **Default:** `process.emitWarning`.",
                      "name": "ctor",
                      "type": "Function",
                      "default": "`process.emitWarning`",
                      "desc": "When `warning` is a `String`, `ctor` is an optional function used to limit the generated stack trace."
                    },
                    {
                      "textRaw": "`detail` {string} Additional text to include with the error.",
                      "name": "detail",
                      "type": "string",
                      "desc": "Additional text to include with the error."
                    }
                  ],
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.emitWarning()</code> method can be used to emit custom or application\nspecific process warnings. These can be listened for by adding a handler to the\n<a href=\"#event-warning\"><code>'warning'</code></a> event.</p>\n<pre><code class=\"language-mjs\">import { emitWarning } from 'node:process';\n\n// Emit a warning with a code and additional detail.\nemitWarning('Something happened!', {\n  code: 'MY_WARNING',\n  detail: 'This is some additional information',\n});\n// Emits:\n// (node:56338) [MY_WARNING] Warning: Something happened!\n// This is some additional information\n</code></pre>\n<pre><code class=\"language-cjs\">const { emitWarning } = require('node:process');\n\n// Emit a warning with a code and additional detail.\nemitWarning('Something happened!', {\n  code: 'MY_WARNING',\n  detail: 'This is some additional information',\n});\n// Emits:\n// (node:56338) [MY_WARNING] Warning: Something happened!\n// This is some additional information\n</code></pre>\n<p>In this example, an <code>Error</code> object is generated internally by\n<code>process.emitWarning()</code> and passed through to the\n<a href=\"#event-warning\"><code>'warning'</code></a> handler.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.on('warning', (warning) => {\n  console.warn(warning.name);    // 'Warning'\n  console.warn(warning.message); // 'Something happened!'\n  console.warn(warning.code);    // 'MY_WARNING'\n  console.warn(warning.stack);   // Stack trace\n  console.warn(warning.detail);  // 'This is some additional information'\n});\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('warning', (warning) => {\n  console.warn(warning.name);    // 'Warning'\n  console.warn(warning.message); // 'Something happened!'\n  console.warn(warning.code);    // 'MY_WARNING'\n  console.warn(warning.stack);   // Stack trace\n  console.warn(warning.detail);  // 'This is some additional information'\n});\n</code></pre>\n<p>If <code>warning</code> is passed as an <code>Error</code> object, the <code>options</code> argument is ignored.</p>"
        },
        {
          "textRaw": "`process.emitWarning(warning[, type[, code]][, ctor])`",
          "name": "emitWarning",
          "type": "method",
          "meta": {
            "added": [
              "v6.0.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`warning` {string|Error} The warning to emit.",
                  "name": "warning",
                  "type": "string|Error",
                  "desc": "The warning to emit."
                },
                {
                  "textRaw": "`type` {string} When `warning` is a `String`, `type` is the name to use for the _type_ of warning being emitted. **Default:** `'Warning'`.",
                  "name": "type",
                  "type": "string",
                  "default": "`'Warning'`",
                  "desc": "When `warning` is a `String`, `type` is the name to use for the _type_ of warning being emitted.",
                  "optional": true
                },
                {
                  "textRaw": "`code` {string} A unique identifier for the warning instance being emitted.",
                  "name": "code",
                  "type": "string",
                  "desc": "A unique identifier for the warning instance being emitted.",
                  "optional": true
                },
                {
                  "textRaw": "`ctor` {Function} When `warning` is a `String`, `ctor` is an optional function used to limit the generated stack trace. **Default:** `process.emitWarning`.",
                  "name": "ctor",
                  "type": "Function",
                  "default": "`process.emitWarning`",
                  "desc": "When `warning` is a `String`, `ctor` is an optional function used to limit the generated stack trace.",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.emitWarning()</code> method can be used to emit custom or application\nspecific process warnings. These can be listened for by adding a handler to the\n<a href=\"#event-warning\"><code>'warning'</code></a> event.</p>\n<pre><code class=\"language-mjs\">import { emitWarning } from 'node:process';\n\n// Emit a warning using a string.\nemitWarning('Something happened!');\n// Emits: (node: 56338) Warning: Something happened!\n</code></pre>\n<pre><code class=\"language-cjs\">const { emitWarning } = require('node:process');\n\n// Emit a warning using a string.\nemitWarning('Something happened!');\n// Emits: (node: 56338) Warning: Something happened!\n</code></pre>\n<pre><code class=\"language-mjs\">import { emitWarning } from 'node:process';\n\n// Emit a warning using a string and a type.\nemitWarning('Something Happened!', 'CustomWarning');\n// Emits: (node:56338) CustomWarning: Something Happened!\n</code></pre>\n<pre><code class=\"language-cjs\">const { emitWarning } = require('node:process');\n\n// Emit a warning using a string and a type.\nemitWarning('Something Happened!', 'CustomWarning');\n// Emits: (node:56338) CustomWarning: Something Happened!\n</code></pre>\n<pre><code class=\"language-mjs\">import { emitWarning } from 'node:process';\n\nemitWarning('Something happened!', 'CustomWarning', 'WARN001');\n// Emits: (node:56338) [WARN001] CustomWarning: Something happened!\n</code></pre>\n<pre><code class=\"language-cjs\">const { emitWarning } = require('node:process');\n\nprocess.emitWarning('Something happened!', 'CustomWarning', 'WARN001');\n// Emits: (node:56338) [WARN001] CustomWarning: Something happened!\n</code></pre>\n<p>In each of the previous examples, an <code>Error</code> object is generated internally by\n<code>process.emitWarning()</code> and passed through to the <a href=\"#event-warning\"><code>'warning'</code></a>\nhandler.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.on('warning', (warning) => {\n  console.warn(warning.name);\n  console.warn(warning.message);\n  console.warn(warning.code);\n  console.warn(warning.stack);\n});\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('warning', (warning) => {\n  console.warn(warning.name);\n  console.warn(warning.message);\n  console.warn(warning.code);\n  console.warn(warning.stack);\n});\n</code></pre>\n<p>If <code>warning</code> is passed as an <code>Error</code> object, it will be passed through to the\n<code>'warning'</code> event handler unmodified (and the optional <code>type</code>,\n<code>code</code> and <code>ctor</code> arguments will be ignored):</p>\n<pre><code class=\"language-mjs\">import { emitWarning } from 'node:process';\n\n// Emit a warning using an Error object.\nconst myWarning = new Error('Something happened!');\n// Use the Error name property to specify the type name\nmyWarning.name = 'CustomWarning';\nmyWarning.code = 'WARN001';\n\nemitWarning(myWarning);\n// Emits: (node:56338) [WARN001] CustomWarning: Something happened!\n</code></pre>\n<pre><code class=\"language-cjs\">const { emitWarning } = require('node:process');\n\n// Emit a warning using an Error object.\nconst myWarning = new Error('Something happened!');\n// Use the Error name property to specify the type name\nmyWarning.name = 'CustomWarning';\nmyWarning.code = 'WARN001';\n\nemitWarning(myWarning);\n// Emits: (node:56338) [WARN001] CustomWarning: Something happened!\n</code></pre>\n<p>A <code>TypeError</code> is thrown if <code>warning</code> is anything other than a string or <code>Error</code>\nobject.</p>\n<p>While process warnings use <code>Error</code> objects, the process warning\nmechanism is <strong>not</strong> a replacement for normal error handling mechanisms.</p>\n<p>The following additional handling is implemented if the warning <code>type</code> is\n<code>'DeprecationWarning'</code>:</p>\n<ul>\n<li>If the <code>--throw-deprecation</code> command-line flag is used, the deprecation\nwarning is thrown as an exception rather than being emitted as an event.</li>\n<li>If the <code>--no-deprecation</code> command-line flag is used, the deprecation\nwarning is suppressed.</li>\n<li>If the <code>--trace-deprecation</code> command-line flag is used, the deprecation\nwarning is printed to <code>stderr</code> along with the full stack trace.</li>\n</ul>",
          "modules": [
            {
              "textRaw": "Avoiding duplicate warnings",
              "name": "avoiding_duplicate_warnings",
              "type": "module",
              "desc": "<p>As a best practice, warnings should be emitted only once per process. To do\nso, place the <code>emitWarning()</code> behind a boolean.</p>\n<pre><code class=\"language-mjs\">import { emitWarning } from 'node:process';\n\nfunction emitMyWarning() {\n  if (!emitMyWarning.warned) {\n    emitMyWarning.warned = true;\n    emitWarning('Only warn once!');\n  }\n}\nemitMyWarning();\n// Emits: (node: 56339) Warning: Only warn once!\nemitMyWarning();\n// Emits nothing\n</code></pre>\n<pre><code class=\"language-cjs\">const { emitWarning } = require('node:process');\n\nfunction emitMyWarning() {\n  if (!emitMyWarning.warned) {\n    emitMyWarning.warned = true;\n    emitWarning('Only warn once!');\n  }\n}\nemitMyWarning();\n// Emits: (node: 56339) Warning: Only warn once!\nemitMyWarning();\n// Emits nothing\n</code></pre>",
              "displayName": "Avoiding duplicate warnings"
            }
          ]
        },
        {
          "textRaw": "`process.execve(file[, args[, env]])`",
          "name": "execve",
          "type": "method",
          "meta": {
            "added": [
              "v23.11.0",
              "v22.15.0"
            ],
            "changes": [
              {
                "version": "v26.1.0",
                "pr-url": "https://github.com/nodejs/node/pull/62878",
                "description": "A failed `execve(2)` system call now throws an exception instead of aborting the process. Native `AtExit` callbacks registered via the embedder API are no longer invoked before the `execve(2)` call."
              }
            ]
          },
          "stability": 1,
          "stabilityText": "Experimental",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`file` {string} The name or path of the executable file to run.",
                  "name": "file",
                  "type": "string",
                  "desc": "The name or path of the executable file to run."
                },
                {
                  "textRaw": "`args` {string}[] List of string arguments. No argument can contain a null-byte (`\\u0000`).",
                  "name": "args",
                  "type": "string",
                  "desc": "[] List of string arguments. No argument can contain a null-byte (`\\u0000`).",
                  "optional": true
                },
                {
                  "textRaw": "`env` {Object} Environment key-value pairs. No key or value can contain a null-byte (`\\u0000`). **Default:** `process.env`.",
                  "name": "env",
                  "type": "Object",
                  "default": "`process.env`",
                  "desc": "Environment key-value pairs. No key or value can contain a null-byte (`\\u0000`).",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>Replaces the current process with a new process.</p>\n<p>This is achieved by using the <code>execve</code> POSIX function and therefore no memory or other\nresources from the current process are preserved, except for the standard input,\nstandard output and standard error file descriptor.</p>\n<p>On success, all other resources are discarded by the system when the\nprocesses are swapped, without triggering any exit or close events, without\nrunning any JavaScript cleanup handler (for example <code>process.on('exit')</code>),\nand without invoking native <code>AtExit</code> callbacks registered through the\nembedder API. Callers that need to run cleanup logic should do so before\ncalling <code>process.execve()</code>.</p>\n<p>This function does not return on success. If the underlying <code>execve(2)</code>\nsystem call fails, an <code>Error</code> is thrown whose <code>code</code> property is set to the\ncorresponding <code>errno</code> string (for example, <code>'ENOENT'</code> when <code>file</code> does not\nexist), with <code>syscall</code> set to <code>'execve'</code> and <code>path</code> set to <code>file</code>. When\n<code>execve(2)</code> fails the current process continues to run with its state\nunchanged, so a caller may handle the error and take another action.</p>\n<p>This function is not available on Windows or IBM i.</p>"
        },
        {
          "textRaw": "`process.exit([code])`",
          "name": "exit",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.13"
            ],
            "changes": [
              {
                "version": "v20.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/43716",
                "description": "Only accepts a code of type number, or of type string if it represents an integer."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`code` {integer|string|null|undefined} The exit code. For string type, only integer strings (e.g.,'1') are allowed. **Default:** `0`.",
                  "name": "code",
                  "type": "integer|string|null|undefined",
                  "default": "`0`",
                  "desc": "The exit code. For string type, only integer strings (e.g.,'1') are allowed.",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.exit()</code> method instructs Node.js to terminate the process\nsynchronously with an exit status of <code>code</code>. If <code>code</code> is omitted, exit uses\neither the 'success' code <code>0</code> or the value of <code>process.exitCode</code> if it has been\nset. Node.js will not terminate until all the <a href=\"#event-exit\"><code>'exit'</code></a> event listeners are\ncalled.</p>\n<p>To exit with a 'failure' code:</p>\n<pre><code class=\"language-mjs\">import { exit } from 'node:process';\n\nexit(1);\n</code></pre>\n<pre><code class=\"language-cjs\">const { exit } = require('node:process');\n\nexit(1);\n</code></pre>\n<p>The shell that executed Node.js should see the exit code as <code>1</code>.</p>\n<p>Calling <code>process.exit()</code> will force the process to exit as quickly as possible\neven if there are still asynchronous operations pending that have not yet\ncompleted fully, including I/O operations to <code>process.stdout</code> and\n<code>process.stderr</code>.</p>\n<p>In most situations, it is not actually necessary to call <code>process.exit()</code>\nexplicitly. The Node.js process will exit on its own <em>if there is no additional\nwork pending</em> in the event loop. The <code>process.exitCode</code> property can be set to\ntell the process which exit code to use when the process exits gracefully.</p>\n<p>For instance, the following example illustrates a <em>misuse</em> of the\n<code>process.exit()</code> method that could lead to data printed to stdout being\ntruncated and lost:</p>\n<pre><code class=\"language-mjs\">import { exit } from 'node:process';\n\n// This is an example of what *not* to do:\nif (someConditionNotMet()) {\n  printUsageToStdout();\n  exit(1);\n}\n</code></pre>\n<pre><code class=\"language-cjs\">const { exit } = require('node:process');\n\n// This is an example of what *not* to do:\nif (someConditionNotMet()) {\n  printUsageToStdout();\n  exit(1);\n}\n</code></pre>\n<p>The reason this is problematic is because writes to <code>process.stdout</code> in Node.js\nare sometimes <em>asynchronous</em> and may occur over multiple ticks of the Node.js\nevent loop. Calling <code>process.exit()</code>, however, forces the process to exit\n<em>before</em> those additional writes to <code>stdout</code> can be performed.</p>\n<p>Rather than calling <code>process.exit()</code> directly, the code <em>should</em> set the\n<code>process.exitCode</code> and allow the process to exit naturally by avoiding\nscheduling any additional work for the event loop:</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\n// How to properly set the exit code while letting\n// the process exit gracefully.\nif (someConditionNotMet()) {\n  printUsageToStdout();\n  process.exitCode = 1;\n}\n</code></pre>\n<pre><code class=\"language-cjs\">// How to properly set the exit code while letting\n// the process exit gracefully.\nif (someConditionNotMet()) {\n  printUsageToStdout();\n  process.exitCode = 1;\n}\n</code></pre>\n<p>If it is necessary to terminate the Node.js process due to an error condition,\nthrowing an <em>uncaught</em> error and allowing the process to terminate accordingly\nis safer than calling <code>process.exit()</code>.</p>\n<p>In <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads, this function stops the current thread rather\nthan the current process.</p>"
        },
        {
          "textRaw": "`process.finalization.register(ref, callback)`",
          "name": "register",
          "type": "method",
          "meta": {
            "added": [
              "v22.5.0"
            ],
            "changes": []
          },
          "stability": 1.1,
          "stabilityText": "Active Development",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`ref` {Object|Function} The reference to the resource that is being tracked.",
                  "name": "ref",
                  "type": "Object|Function",
                  "desc": "The reference to the resource that is being tracked."
                },
                {
                  "textRaw": "`callback` {Function} The callback function to be called when the resource is finalized.",
                  "name": "callback",
                  "type": "Function",
                  "desc": "The callback function to be called when the resource is finalized.",
                  "options": [
                    {
                      "textRaw": "`ref` {Object|Function} The reference to the resource that is being tracked.",
                      "name": "ref",
                      "type": "Object|Function",
                      "desc": "The reference to the resource that is being tracked."
                    },
                    {
                      "textRaw": "`event` {string} The event that triggered the finalization. Defaults to 'exit'.",
                      "name": "event",
                      "type": "string",
                      "desc": "The event that triggered the finalization. Defaults to 'exit'."
                    }
                  ]
                }
              ]
            }
          ],
          "desc": "<p>This function registers a callback to be called when the process emits the <code>exit</code>\nevent if the <code>ref</code> object was not garbage collected. If the object <code>ref</code> was garbage collected\nbefore the <code>exit</code> event is emitted, the callback will be removed from the finalization registry,\nand it will not be called on process exit.</p>\n<p>Inside the callback you can release the resources allocated by the <code>ref</code> object.\nBe aware that all limitations applied to the <code>beforeExit</code> event are also applied to the <code>callback</code> function,\nthis means that there is a possibility that the callback will not be called under special circumstances.</p>\n<p>The idea of ​​this function is to help you free up resources when the starts process exiting,\nbut also let the object be garbage collected if it is no longer being used.</p>\n<p>Eg: you can register an object that contains a buffer, you want to make sure that buffer is released\nwhen the process exit, but if the object is garbage collected before the process exit, we no longer\nneed to release the buffer, so in this case we just remove the callback from the finalization registry.</p>\n<pre><code class=\"language-cjs\">const { finalization } = require('node:process');\n\n// Please make sure that the function passed to finalization.register()\n// does not create a closure around unnecessary objects.\nfunction onFinalize(obj, event) {\n  // You can do whatever you want with the object\n  obj.dispose();\n}\n\nfunction setup() {\n  // This object can be safely garbage collected,\n  // and the resulting shutdown function will not be called.\n  // There are no leaks.\n  const myDisposableObject = {\n    dispose() {\n      // Free your resources synchronously\n    },\n  };\n\n  finalization.register(myDisposableObject, onFinalize);\n}\n\nsetup();\n</code></pre>\n<pre><code class=\"language-mjs\">import { finalization } from 'node:process';\n\n// Please make sure that the function passed to finalization.register()\n// does not create a closure around unnecessary objects.\nfunction onFinalize(obj, event) {\n  // You can do whatever you want with the object\n  obj.dispose();\n}\n\nfunction setup() {\n  // This object can be safely garbage collected,\n  // and the resulting shutdown function will not be called.\n  // There are no leaks.\n  const myDisposableObject = {\n    dispose() {\n      // Free your resources synchronously\n    },\n  };\n\n  finalization.register(myDisposableObject, onFinalize);\n}\n\nsetup();\n</code></pre>\n<p>The code above relies on the following assumptions:</p>\n<ul>\n<li>arrow functions are avoided</li>\n<li>regular functions are recommended to be within the global context (root)</li>\n</ul>\n<p>Regular functions <em>could</em> reference the context where the <code>obj</code> lives, making the <code>obj</code> not garbage collectible.</p>\n<p>Arrow functions will hold the previous context. Consider, for example:</p>\n<pre><code class=\"language-js\">class Test {\n  constructor() {\n    finalization.register(this, (ref) => ref.dispose());\n\n    // Even something like this is highly discouraged\n    // finalization.register(this, () => this.dispose());\n  }\n  dispose() {}\n}\n</code></pre>\n<p>It is very unlikely (not impossible) that this object will be garbage collected,\nbut if it is not, <code>dispose</code> will be called when <code>process.exit</code> is called.</p>\n<p>Be careful and avoid relying on this feature for the disposal of critical resources,\nas it is not guaranteed that the callback will be called under all circumstances.</p>"
        },
        {
          "textRaw": "`process.finalization.registerBeforeExit(ref, callback)`",
          "name": "registerBeforeExit",
          "type": "method",
          "meta": {
            "added": [
              "v22.5.0"
            ],
            "changes": []
          },
          "stability": 1.1,
          "stabilityText": "Active Development",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`ref` {Object|Function} The reference to the resource that is being tracked.",
                  "name": "ref",
                  "type": "Object|Function",
                  "desc": "The reference to the resource that is being tracked."
                },
                {
                  "textRaw": "`callback` {Function} The callback function to be called when the resource is finalized.",
                  "name": "callback",
                  "type": "Function",
                  "desc": "The callback function to be called when the resource is finalized.",
                  "options": [
                    {
                      "textRaw": "`ref` {Object|Function} The reference to the resource that is being tracked.",
                      "name": "ref",
                      "type": "Object|Function",
                      "desc": "The reference to the resource that is being tracked."
                    },
                    {
                      "textRaw": "`event` {string} The event that triggered the finalization. Defaults to 'beforeExit'.",
                      "name": "event",
                      "type": "string",
                      "desc": "The event that triggered the finalization. Defaults to 'beforeExit'."
                    }
                  ]
                }
              ]
            }
          ],
          "desc": "<p>This function behaves exactly like the <code>register</code>, except that the callback will be called\nwhen the process emits the <code>beforeExit</code> event if <code>ref</code> object was not garbage collected.</p>\n<p>Be aware that all limitations applied to the <code>beforeExit</code> event are also applied to the <code>callback</code> function,\nthis means that there is a possibility that the callback will not be called under special circumstances.</p>"
        },
        {
          "textRaw": "`process.finalization.unregister(ref)`",
          "name": "unregister",
          "type": "method",
          "meta": {
            "added": [
              "v22.5.0"
            ],
            "changes": []
          },
          "stability": 1.1,
          "stabilityText": "Active Development",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`ref` {Object|Function} The reference to the resource that was registered previously.",
                  "name": "ref",
                  "type": "Object|Function",
                  "desc": "The reference to the resource that was registered previously."
                }
              ]
            }
          ],
          "desc": "<p>This function remove the register of the object from the finalization\nregistry, so the callback will not be called anymore.</p>\n<pre><code class=\"language-cjs\">const { finalization } = require('node:process');\n\n// Please make sure that the function passed to finalization.register()\n// does not create a closure around unnecessary objects.\nfunction onFinalize(obj, event) {\n  // You can do whatever you want with the object\n  obj.dispose();\n}\n\nfunction setup() {\n  // This object can be safely garbage collected,\n  // and the resulting shutdown function will not be called.\n  // There are no leaks.\n  const myDisposableObject = {\n    dispose() {\n      // Free your resources synchronously\n    },\n  };\n\n  finalization.register(myDisposableObject, onFinalize);\n\n  // Do something\n\n  myDisposableObject.dispose();\n  finalization.unregister(myDisposableObject);\n}\n\nsetup();\n</code></pre>\n<pre><code class=\"language-mjs\">import { finalization } from 'node:process';\n\n// Please make sure that the function passed to finalization.register()\n// does not create a closure around unnecessary objects.\nfunction onFinalize(obj, event) {\n  // You can do whatever you want with the object\n  obj.dispose();\n}\n\nfunction setup() {\n  // This object can be safely garbage collected,\n  // and the resulting shutdown function will not be called.\n  // There are no leaks.\n  const myDisposableObject = {\n    dispose() {\n      // Free your resources synchronously\n    },\n  };\n\n  // Please make sure that the function passed to finalization.register()\n  // does not create a closure around unnecessary objects.\n  function onFinalize(obj, event) {\n    // You can do whatever you want with the object\n    obj.dispose();\n  }\n\n  finalization.register(myDisposableObject, onFinalize);\n\n  // Do something\n\n  myDisposableObject.dispose();\n  finalization.unregister(myDisposableObject);\n}\n\nsetup();\n</code></pre>"
        },
        {
          "textRaw": "`process.getActiveResourcesInfo()`",
          "name": "getActiveResourcesInfo",
          "type": "method",
          "meta": {
            "added": [
              "v17.3.0",
              "v16.14.0"
            ],
            "changes": [
              {
                "version": [
                  "v24.0.0",
                  "v22.16.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/57765",
                "description": "Change stability index for this feature from Experimental to Stable."
              }
            ]
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {string}[]",
                "name": "return",
                "type": "string",
                "desc": "[]"
              }
            }
          ],
          "desc": "<p>The <code>process.getActiveResourcesInfo()</code> method returns an array of strings\ncontaining the types of the active resources that are currently keeping the\nevent loop alive.</p>\n<pre><code class=\"language-mjs\">import { getActiveResourcesInfo } from 'node:process';\nimport { setTimeout } from 'node:timers';\n\nconsole.log('Before:', getActiveResourcesInfo());\nsetTimeout(() => {}, 1000);\nconsole.log('After:', getActiveResourcesInfo());\n// Prints:\n//   Before: [ 'CloseReq', 'TTYWrap', 'TTYWrap', 'TTYWrap' ]\n//   After: [ 'CloseReq', 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ]\n</code></pre>\n<pre><code class=\"language-cjs\">const { getActiveResourcesInfo } = require('node:process');\nconst { setTimeout } = require('node:timers');\n\nconsole.log('Before:', getActiveResourcesInfo());\nsetTimeout(() => {}, 1000);\nconsole.log('After:', getActiveResourcesInfo());\n// Prints:\n//   Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ]\n//   After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ]\n</code></pre>"
        },
        {
          "textRaw": "`process.getBuiltinModule(id)`",
          "name": "getBuiltinModule",
          "type": "method",
          "meta": {
            "added": [
              "v22.3.0",
              "v20.16.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`id` {string} ID of the built-in module being requested.",
                  "name": "id",
                  "type": "string",
                  "desc": "ID of the built-in module being requested."
                }
              ],
              "return": {
                "textRaw": "Returns: {Object|undefined}",
                "name": "return",
                "type": "Object|undefined"
              }
            }
          ],
          "desc": "<p><code>process.getBuiltinModule(id)</code> provides a way to load built-in modules\nin a globally available function. ES Modules that need to support\nother environments can use it to conditionally load a Node.js built-in\nwhen it is run in Node.js, without having to deal with the resolution\nerror that can be thrown by <code>import</code> in a non-Node.js environment or\nhaving to use dynamic <code>import()</code> which either turns the module into\nan asynchronous module, or turns a synchronous API into an asynchronous one.</p>\n<pre><code class=\"language-mjs\">if (globalThis.process?.getBuiltinModule) {\n  // Run in Node.js, use the Node.js fs module.\n  const fs = globalThis.process.getBuiltinModule('fs');\n  // If `require()` is needed to load user-modules, use createRequire()\n  const module = globalThis.process.getBuiltinModule('module');\n  const require = module.createRequire(import.meta.url);\n  const foo = require('foo');\n}\n</code></pre>\n<p>If <code>id</code> specifies a built-in module available in the current Node.js process,\n<code>process.getBuiltinModule(id)</code> method returns the corresponding built-in\nmodule. If <code>id</code> does not correspond to any built-in module, <code>undefined</code>\nis returned.</p>\n<p><code>process.getBuiltinModule(id)</code> accepts built-in module IDs that are recognized\nby <a href=\"module.html#moduleisbuiltinmodulename\"><code>module.isBuiltin(id)</code></a>. Some built-in modules must be loaded with the\n<code>node:</code> prefix, see <a href=\"modules.html#built-in-modules-with-mandatory-node-prefix\">built-in modules with mandatory <code>node:</code> prefix</a>.\nThe references returned by <code>process.getBuiltinModule(id)</code> always point to\nthe built-in module corresponding to <code>id</code> even if users modify\n<a href=\"modules.html#requirecache\"><code>require.cache</code></a> so that <code>require(id)</code> returns something else.</p>"
        },
        {
          "textRaw": "`process.getegid()`",
          "name": "getegid",
          "type": "method",
          "meta": {
            "added": [
              "v2.0.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": []
            }
          ],
          "desc": "<p>The <code>process.getegid()</code> method returns the numerical effective group identity\nof the Node.js process. (See <a href=\"http://man7.org/linux/man-pages/man2/getegid.2.html\"><code>getegid(2)</code></a>.)</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.getegid) {\n  console.log(`Current gid: ${process.getegid()}`);\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.getegid) {\n  console.log(`Current gid: ${process.getegid()}`);\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).</p>"
        },
        {
          "textRaw": "`process.geteuid()`",
          "name": "geteuid",
          "type": "method",
          "meta": {
            "added": [
              "v2.0.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {Object}",
                "name": "return",
                "type": "Object"
              }
            }
          ],
          "desc": "<p>The <code>process.geteuid()</code> method returns the numerical effective user identity of\nthe process. (See <a href=\"http://man7.org/linux/man-pages/man2/geteuid.2.html\"><code>geteuid(2)</code></a>.)</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.geteuid) {\n  console.log(`Current uid: ${process.geteuid()}`);\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.geteuid) {\n  console.log(`Current uid: ${process.geteuid()}`);\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).</p>"
        },
        {
          "textRaw": "`process.getgid()`",
          "name": "getgid",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {Object}",
                "name": "return",
                "type": "Object"
              }
            }
          ],
          "desc": "<p>The <code>process.getgid()</code> method returns the numerical group identity of the\nprocess. (See <a href=\"http://man7.org/linux/man-pages/man2/getgid.2.html\"><code>getgid(2)</code></a>.)</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.getgid) {\n  console.log(`Current gid: ${process.getgid()}`);\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.getgid) {\n  console.log(`Current gid: ${process.getgid()}`);\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).</p>"
        },
        {
          "textRaw": "`process.getgroups()`",
          "name": "getgroups",
          "type": "method",
          "meta": {
            "added": [
              "v0.9.4"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {integer}[]",
                "name": "return",
                "type": "integer",
                "desc": "[]"
              }
            }
          ],
          "desc": "<p>The <code>process.getgroups()</code> method returns an array with the supplementary group\nIDs. POSIX leaves it unspecified if the effective group ID is included but\nNode.js ensures it always is.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.getgroups) {\n  console.log(process.getgroups()); // [ 16, 21, 297 ]\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.getgroups) {\n  console.log(process.getgroups()); // [ 16, 21, 297 ]\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).</p>"
        },
        {
          "textRaw": "`process.getuid()`",
          "name": "getuid",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.28"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {integer}",
                "name": "return",
                "type": "integer"
              }
            }
          ],
          "desc": "<p>The <code>process.getuid()</code> method returns the numeric user identity of the process.\n(See <a href=\"http://man7.org/linux/man-pages/man2/getuid.2.html\"><code>getuid(2)</code></a>.)</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.getuid) {\n  console.log(`Current uid: ${process.getuid()}`);\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.getuid) {\n  console.log(`Current uid: ${process.getuid()}`);\n}\n</code></pre>\n<p>This function not available on Windows.</p>"
        },
        {
          "textRaw": "`process.hasUncaughtExceptionCaptureCallback()`",
          "name": "hasUncaughtExceptionCaptureCallback",
          "type": "method",
          "meta": {
            "added": [
              "v9.3.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {boolean}",
                "name": "return",
                "type": "boolean"
              }
            }
          ],
          "desc": "<p>Indicates whether a callback has been set using\n<a href=\"#processsetuncaughtexceptioncapturecallbackfn\"><code>process.setUncaughtExceptionCaptureCallback()</code></a>.</p>"
        },
        {
          "textRaw": "`process.hrtime([time])`",
          "name": "hrtime",
          "type": "method",
          "meta": {
            "added": [
              "v0.7.6"
            ],
            "changes": []
          },
          "stability": 3,
          "stabilityText": "Legacy. Use `process.hrtime.bigint()` instead.",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`time` {integer}[] The result of a previous call to `process.hrtime()`",
                  "name": "time",
                  "type": "integer",
                  "desc": "[] The result of a previous call to `process.hrtime()`",
                  "optional": true
                }
              ],
              "return": {
                "textRaw": "Returns: {integer}[]",
                "name": "return",
                "type": "integer",
                "desc": "[]"
              }
            }
          ],
          "desc": "<p>This is the legacy version of <a href=\"#processhrtimebigint\"><code>process.hrtime.bigint()</code></a>\nbefore <code>bigint</code> was introduced in JavaScript.</p>\n<p>The <code>process.hrtime()</code> method returns the current high-resolution real time\nin a <code>[seconds, nanoseconds]</code> tuple <code>Array</code>, where <code>nanoseconds</code> is the\nremaining part of the real time that can't be represented in second precision.</p>\n<p><code>time</code> is an optional parameter that must be the result of a previous\n<code>process.hrtime()</code> call to diff with the current time. If the parameter\npassed in is not a tuple <code>Array</code>, a <code>TypeError</code> will be thrown. Passing in a\nuser-defined array instead of the result of a previous call to\n<code>process.hrtime()</code> will lead to undefined behavior.</p>\n<p>These times are relative to an arbitrary time in the\npast, and not related to the time of day and therefore not subject to clock\ndrift. The primary use is for measuring performance between intervals:</p>\n<pre><code class=\"language-mjs\">import { hrtime } from 'node:process';\n\nconst NS_PER_SEC = 1e9;\nconst time = hrtime();\n// [ 1800216, 25 ]\n\nsetTimeout(() => {\n  const diff = hrtime(time);\n  // [ 1, 552 ]\n\n  console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`);\n  // Benchmark took 1000000552 nanoseconds\n}, 1000);\n</code></pre>\n<pre><code class=\"language-cjs\">const { hrtime } = require('node:process');\n\nconst NS_PER_SEC = 1e9;\nconst time = hrtime();\n// [ 1800216, 25 ]\n\nsetTimeout(() => {\n  const diff = hrtime(time);\n  // [ 1, 552 ]\n\n  console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`);\n  // Benchmark took 1000000552 nanoseconds\n}, 1000);\n</code></pre>"
        },
        {
          "textRaw": "`process.hrtime.bigint()`",
          "name": "bigint",
          "type": "method",
          "meta": {
            "added": [
              "v10.7.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {bigint}",
                "name": "return",
                "type": "bigint"
              }
            }
          ],
          "desc": "<p>The <code>bigint</code> version of the <a href=\"#processhrtimetime\"><code>process.hrtime()</code></a> method returning the\ncurrent high-resolution real time in nanoseconds as a <code>bigint</code>.</p>\n<p>Unlike <a href=\"#processhrtimetime\"><code>process.hrtime()</code></a>, it does not support an additional <code>time</code>\nargument since the difference can just be computed directly\nby subtraction of the two <code>bigint</code>s.</p>\n<pre><code class=\"language-mjs\">import { hrtime } from 'node:process';\n\nconst start = hrtime.bigint();\n// 191051479007711n\n\nsetTimeout(() => {\n  const end = hrtime.bigint();\n  // 191052633396993n\n\n  console.log(`Benchmark took ${end - start} nanoseconds`);\n  // Benchmark took 1154389282 nanoseconds\n}, 1000);\n</code></pre>\n<pre><code class=\"language-cjs\">const { hrtime } = require('node:process');\n\nconst start = hrtime.bigint();\n// 191051479007711n\n\nsetTimeout(() => {\n  const end = hrtime.bigint();\n  // 191052633396993n\n\n  console.log(`Benchmark took ${end - start} nanoseconds`);\n  // Benchmark took 1154389282 nanoseconds\n}, 1000);\n</code></pre>"
        },
        {
          "textRaw": "`process.initgroups(user, extraGroup)`",
          "name": "initgroups",
          "type": "method",
          "meta": {
            "added": [
              "v0.9.4"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`user` {string|number} The user name or numeric identifier.",
                  "name": "user",
                  "type": "string|number",
                  "desc": "The user name or numeric identifier."
                },
                {
                  "textRaw": "`extraGroup` {string|number} A group name or numeric identifier.",
                  "name": "extraGroup",
                  "type": "string|number",
                  "desc": "A group name or numeric identifier."
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.initgroups()</code> method reads the <code>/etc/group</code> file and initializes\nthe group access list, using all groups of which the user is a member. This is\na privileged operation that requires that the Node.js process either have <code>root</code>\naccess or the <code>CAP_SETGID</code> capability.</p>\n<p>Use care when dropping privileges:</p>\n<pre><code class=\"language-mjs\">import { getgroups, initgroups, setgid } from 'node:process';\n\nconsole.log(getgroups());         // [ 0 ]\ninitgroups('nodeuser', 1000);     // switch user\nconsole.log(getgroups());         // [ 27, 30, 46, 1000, 0 ]\nsetgid(1000);                     // drop root gid\nconsole.log(getgroups());         // [ 27, 30, 46, 1000 ]\n</code></pre>\n<pre><code class=\"language-cjs\">const { getgroups, initgroups, setgid } = require('node:process');\n\nconsole.log(getgroups());         // [ 0 ]\ninitgroups('nodeuser', 1000);     // switch user\nconsole.log(getgroups());         // [ 27, 30, 46, 1000, 0 ]\nsetgid(1000);                     // drop root gid\nconsole.log(getgroups());         // [ 27, 30, 46, 1000 ]\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).\nThis feature is not available in <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>"
        },
        {
          "textRaw": "`process.kill(pid[, signal])`",
          "name": "kill",
          "type": "method",
          "meta": {
            "added": [
              "v0.0.6"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`pid` {number} A process ID",
                  "name": "pid",
                  "type": "number",
                  "desc": "A process ID"
                },
                {
                  "textRaw": "`signal` {string|number} The signal to send, either as a string or number. **Default:** `'SIGTERM'`.",
                  "name": "signal",
                  "type": "string|number",
                  "default": "`'SIGTERM'`",
                  "desc": "The signal to send, either as a string or number.",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.kill()</code> method sends the <code>signal</code> to the process identified by\n<code>pid</code>.</p>\n<p>Signal names are strings such as <code>'SIGINT'</code> or <code>'SIGHUP'</code>. See <a href=\"#signal-events\">Signal Events</a> and <a href=\"http://man7.org/linux/man-pages/man2/kill.2.html\"><code>kill(2)</code></a> for more information.</p>\n<p>This method will throw an error if the target <code>pid</code> does not exist. As a special\ncase, a signal of <code>0</code> can be used to test for the existence of a process.\nWindows platforms will throw an error if the <code>pid</code> is used to kill a process\ngroup.</p>\n<p>Even though the name of this function is <code>process.kill()</code>, it is really just a\nsignal sender, like the <code>kill</code> system call. The signal sent may do something\nother than kill the target process.</p>\n<pre><code class=\"language-mjs\">import process, { kill } from 'node:process';\n\nprocess.on('SIGHUP', () => {\n  console.log('Got SIGHUP signal.');\n});\n\nsetTimeout(() => {\n  console.log('Exiting.');\n  process.exit(0);\n}, 100);\n\nkill(process.pid, 'SIGHUP');\n</code></pre>\n<pre><code class=\"language-cjs\">process.on('SIGHUP', () => {\n  console.log('Got SIGHUP signal.');\n});\n\nsetTimeout(() => {\n  console.log('Exiting.');\n  process.exit(0);\n}, 100);\n\nprocess.kill(process.pid, 'SIGHUP');\n</code></pre>\n<p>When <code>SIGUSR1</code> is received by a Node.js process, Node.js will start the\ndebugger. See <a href=\"#signal-events\">Signal Events</a>.</p>"
        },
        {
          "textRaw": "`process.loadEnvFile(path)`",
          "name": "loadEnvFile",
          "type": "method",
          "meta": {
            "added": [
              "v21.7.0",
              "v20.12.0"
            ],
            "changes": [
              {
                "version": [
                  "v24.10.0",
                  "v22.21.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/59925",
                "description": "This API is no longer experimental."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`path` {string|URL|Buffer|undefined}. **Default:** `'./.env'`",
                  "name": "path",
                  "type": "string|URL|Buffer|undefined",
                  "default": "`'./.env'`",
                  "desc": "."
                }
              ]
            }
          ],
          "desc": "<p>Loads the <code>.env</code> file into <code>process.env</code>. Usage of <code>NODE_OPTIONS</code>\nin the <code>.env</code> file will not have any effect on Node.js.</p>\n<pre><code class=\"language-cjs\">const { loadEnvFile } = require('node:process');\nloadEnvFile();\n</code></pre>\n<pre><code class=\"language-mjs\">import { loadEnvFile } from 'node:process';\nloadEnvFile();\n</code></pre>"
        },
        {
          "textRaw": "`process.memoryUsage()`",
          "name": "memoryUsage",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.16"
            ],
            "changes": [
              {
                "version": [
                  "v13.9.0",
                  "v12.17.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/31550",
                "description": "Added `arrayBuffers` to the returned object."
              },
              {
                "version": "v7.2.0",
                "pr-url": "https://github.com/nodejs/node/pull/9587",
                "description": "Added `external` to the returned object."
              }
            ]
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {Object}",
                "name": "return",
                "type": "Object",
                "options": [
                  {
                    "textRaw": "`rss` {integer}",
                    "name": "rss",
                    "type": "integer"
                  },
                  {
                    "textRaw": "`heapTotal` {integer}",
                    "name": "heapTotal",
                    "type": "integer"
                  },
                  {
                    "textRaw": "`heapUsed` {integer}",
                    "name": "heapUsed",
                    "type": "integer"
                  },
                  {
                    "textRaw": "`external` {integer}",
                    "name": "external",
                    "type": "integer"
                  },
                  {
                    "textRaw": "`arrayBuffers` {integer}",
                    "name": "arrayBuffers",
                    "type": "integer"
                  }
                ]
              }
            }
          ],
          "desc": "<p>Returns an object describing the memory usage of the Node.js process measured in\nbytes.</p>\n<pre><code class=\"language-mjs\">import { memoryUsage } from 'node:process';\n\nconsole.log(memoryUsage());\n// Prints:\n// {\n//  rss: 4935680,\n//  heapTotal: 1826816,\n//  heapUsed: 650472,\n//  external: 49879,\n//  arrayBuffers: 9386\n// }\n</code></pre>\n<pre><code class=\"language-cjs\">const { memoryUsage } = require('node:process');\n\nconsole.log(memoryUsage());\n// Prints:\n// {\n//  rss: 4935680,\n//  heapTotal: 1826816,\n//  heapUsed: 650472,\n//  external: 49879,\n//  arrayBuffers: 9386\n// }\n</code></pre>\n<ul>\n<li><code>heapTotal</code> and <code>heapUsed</code> refer to V8's memory usage.</li>\n<li><code>external</code> refers to the memory usage of C++ objects bound to JavaScript\nobjects managed by V8.</li>\n<li><code>rss</code>, Resident Set Size, is the amount of space occupied in the main\nmemory device (that is a subset of the total allocated memory) for the\nprocess, including all C++ and JavaScript objects and code.</li>\n<li><code>arrayBuffers</code> refers to memory allocated for <code>ArrayBuffer</code>s and\n<code>SharedArrayBuffer</code>s, including all Node.js <a href=\"buffer.html\"><code>Buffer</code></a>s.\nThis is also included in the <code>external</code> value. When Node.js is used as an\nembedded library, this value may be <code>0</code> because allocations for <code>ArrayBuffer</code>s\nmay not be tracked in that case.</li>\n</ul>\n<p>When using <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads, <code>rss</code> will be a value that is valid for the\nentire process, while the other fields will only refer to the current thread.</p>\n<p>The <code>process.memoryUsage()</code> method iterates over each page to gather\ninformation about memory usage which might be slow depending on the\nprogram memory allocations.</p>",
          "modules": [
            {
              "textRaw": "A note on process memoryUsage",
              "name": "a_note_on_process_memoryusage",
              "type": "module",
              "desc": "<p>On Linux or other systems where glibc is commonly used, an application may have sustained\n<code>rss</code> growth despite stable <code>heapTotal</code> due to fragmentation caused by the glibc <code>malloc</code>\nimplementation. See <a href=\"https://github.com/nodejs/node/issues/21973\">nodejs/node#21973</a> on how to switch to an alternative <code>malloc</code>\nimplementation to address the performance issue.</p>",
              "displayName": "A note on process memoryUsage"
            }
          ]
        },
        {
          "textRaw": "`process.memoryUsage.rss()`",
          "name": "rss",
          "type": "method",
          "meta": {
            "added": [
              "v15.6.0",
              "v14.18.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {integer}",
                "name": "return",
                "type": "integer"
              }
            }
          ],
          "desc": "<p>The <code>process.memoryUsage.rss()</code> method returns an integer representing the\nResident Set Size (RSS) in bytes.</p>\n<p>The Resident Set Size, is the amount of space occupied in the main\nmemory device (that is a subset of the total allocated memory) for the\nprocess, including all C++ and JavaScript objects and code.</p>\n<p>This is the same value as the <code>rss</code> property provided by <code>process.memoryUsage()</code>\nbut <code>process.memoryUsage.rss()</code> is faster.</p>\n<pre><code class=\"language-mjs\">import { memoryUsage } from 'node:process';\n\nconsole.log(memoryUsage.rss());\n// 35655680\n</code></pre>\n<pre><code class=\"language-cjs\">const { memoryUsage } = require('node:process');\n\nconsole.log(memoryUsage.rss());\n// 35655680\n</code></pre>"
        },
        {
          "textRaw": "`process.nextTick(callback[, ...args])`",
          "name": "nextTick",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.26"
            ],
            "changes": [
              {
                "version": [
                  "v22.7.0",
                  "v20.18.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/51280",
                "description": "Changed stability to Legacy."
              },
              {
                "version": "v18.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/41678",
                "description": "Passing an invalid callback to the `callback` argument now throws `ERR_INVALID_ARG_TYPE` instead of `ERR_INVALID_CALLBACK`."
              },
              {
                "version": "v1.8.1",
                "pr-url": "https://github.com/nodejs/node/pull/1077",
                "description": "Additional arguments after `callback` are now supported."
              }
            ]
          },
          "stability": 3,
          "stabilityText": "Legacy: Use `queueMicrotask()` instead.",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`callback` {Function}",
                  "name": "callback",
                  "type": "Function"
                },
                {
                  "textRaw": "`...args` {any} Additional arguments to pass when invoking the `callback`",
                  "name": "...args",
                  "type": "any",
                  "desc": "Additional arguments to pass when invoking the `callback`",
                  "optional": true
                }
              ]
            }
          ],
          "desc": "<p><code>process.nextTick()</code> adds <code>callback</code> to the \"next tick queue\". This queue is\nfully drained after the current operation on the JavaScript stack runs to\ncompletion and before the event loop is allowed to continue. It's possible to\ncreate an infinite loop if one were to recursively call <code>process.nextTick()</code>.\nSee the <a href=\"https://nodejs.org/en/learn/asynchronous-work/event-loop-timers-and-nexttick#understanding-processnexttick\">Event Loop</a> guide for more background.</p>\n<pre><code class=\"language-mjs\">import { nextTick } from 'node:process';\n\nconsole.log('start');\nnextTick(() => {\n  console.log('nextTick callback');\n});\nconsole.log('scheduled');\n// Output:\n// start\n// scheduled\n// nextTick callback\n</code></pre>\n<pre><code class=\"language-cjs\">const { nextTick } = require('node:process');\n\nconsole.log('start');\nnextTick(() => {\n  console.log('nextTick callback');\n});\nconsole.log('scheduled');\n// Output:\n// start\n// scheduled\n// nextTick callback\n</code></pre>\n<p>This is important when developing APIs in order to give users the opportunity\nto assign event handlers <em>after</em> an object has been constructed but before any\nI/O has occurred:</p>\n<pre><code class=\"language-mjs\">import { nextTick } from 'node:process';\n\nfunction MyThing(options) {\n  this.setupOptions(options);\n\n  nextTick(() => {\n    this.startDoingStuff();\n  });\n}\n\nconst thing = new MyThing();\nthing.getReadyForStuff();\n\n// thing.startDoingStuff() gets called now, not before.\n</code></pre>\n<pre><code class=\"language-cjs\">const { nextTick } = require('node:process');\n\nfunction MyThing(options) {\n  this.setupOptions(options);\n\n  nextTick(() => {\n    this.startDoingStuff();\n  });\n}\n\nconst thing = new MyThing();\nthing.getReadyForStuff();\n\n// thing.startDoingStuff() gets called now, not before.\n</code></pre>\n<p>It is very important for APIs to be either 100% synchronous or 100%\nasynchronous. Consider this example:</p>\n<pre><code class=\"language-js\">// WARNING!  DO NOT USE!  BAD UNSAFE HAZARD!\nfunction maybeSync(arg, cb) {\n  if (arg) {\n    cb();\n    return;\n  }\n\n  fs.stat('file', cb);\n}\n</code></pre>\n<p>This API is hazardous because in the following case:</p>\n<pre><code class=\"language-js\">const maybeTrue = Math.random() > 0.5;\n\nmaybeSync(maybeTrue, () => {\n  foo();\n});\n\nbar();\n</code></pre>\n<p>It is not clear whether <code>foo()</code> or <code>bar()</code> will be called first.</p>\n<p>The following approach is much better:</p>\n<pre><code class=\"language-mjs\">import { nextTick } from 'node:process';\n\nfunction definitelyAsync(arg, cb) {\n  if (arg) {\n    nextTick(cb);\n    return;\n  }\n\n  fs.stat('file', cb);\n}\n</code></pre>\n<pre><code class=\"language-cjs\">const { nextTick } = require('node:process');\n\nfunction definitelyAsync(arg, cb) {\n  if (arg) {\n    nextTick(cb);\n    return;\n  }\n\n  fs.stat('file', cb);\n}\n</code></pre>",
          "modules": [
            {
              "textRaw": "When to use `queueMicrotask()` vs. `process.nextTick()`",
              "name": "when_to_use_`queuemicrotask()`_vs._`process.nexttick()`",
              "type": "module",
              "desc": "<p>The <a href=\"globals.html#queuemicrotaskcallback\"><code>queueMicrotask()</code></a> API is an alternative to <code>process.nextTick()</code> that instead of using the\n\"next tick queue\" defers execution of a function using the same microtask queue used to execute the\nthen, catch, and finally handlers of resolved promises.</p>\n<p>Within Node.js, every time the \"next tick queue\" is drained, the microtask queue\nis drained immediately after.</p>\n<p>So in CJS modules <code>process.nextTick()</code> callbacks are always run before <code>queueMicrotask()</code> ones.\nHowever since ESM modules are processed already as part of the microtask queue, there\n<code>queueMicrotask()</code> callbacks are always executed before <code>process.nextTick()</code> ones since Node.js\nis already in the process of draining the microtask queue.</p>\n<pre><code class=\"language-mjs\">import { nextTick } from 'node:process';\n\nPromise.resolve().then(() => console.log('resolve'));\nqueueMicrotask(() => console.log('microtask'));\nnextTick(() => console.log('nextTick'));\n// Output:\n// resolve\n// microtask\n// nextTick\n</code></pre>\n<pre><code class=\"language-cjs\">const { nextTick } = require('node:process');\n\nPromise.resolve().then(() => console.log('resolve'));\nqueueMicrotask(() => console.log('microtask'));\nnextTick(() => console.log('nextTick'));\n// Output:\n// nextTick\n// resolve\n// microtask\n</code></pre>\n<p>For <em>most</em> userland use cases, the <code>queueMicrotask()</code> API provides a portable\nand reliable mechanism for deferring execution that works across multiple\nJavaScript platform environments and should be favored over <code>process.nextTick()</code>.\nIn simple scenarios, <code>queueMicrotask()</code> can be a drop-in replacement for\n<code>process.nextTick()</code>.</p>\n<pre><code class=\"language-js\">console.log('start');\nqueueMicrotask(() => {\n  console.log('microtask callback');\n});\nconsole.log('scheduled');\n// Output:\n// start\n// scheduled\n// microtask callback\n</code></pre>\n<p>One note-worthy difference between the two APIs is that <code>process.nextTick()</code>\nallows specifying additional values that will be passed as arguments to the\ndeferred function when it is called. Achieving the same result with\n<code>queueMicrotask()</code> requires using either a closure or a bound function:</p>\n<pre><code class=\"language-js\">function deferred(a, b) {\n  console.log('microtask', a + b);\n}\n\nconsole.log('start');\nqueueMicrotask(deferred.bind(undefined, 1, 2));\nconsole.log('scheduled');\n// Output:\n// start\n// scheduled\n// microtask 3\n</code></pre>\n<p>There are minor differences in the way errors raised from within the next tick\nqueue and microtask queue are handled. Errors thrown within a queued microtask\ncallback should be handled within the queued callback when possible. If they are\nnot, the <code>process.on('uncaughtException')</code> event handler can be used to capture\nand handle the errors.</p>\n<p>When in doubt, unless the specific capabilities of <code>process.nextTick()</code> are\nneeded, use <code>queueMicrotask()</code>.</p>",
              "displayName": "When to use `queueMicrotask()` vs. `process.nextTick()`"
            }
          ]
        },
        {
          "textRaw": "`process.ref(maybeRefable)`",
          "name": "ref",
          "type": "method",
          "meta": {
            "added": [
              "v23.6.0",
              "v22.14.0"
            ],
            "changes": []
          },
          "stability": 1,
          "stabilityText": "Experimental",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`maybeRefable` {any} An object that may be \"refable\".",
                  "name": "maybeRefable",
                  "type": "any",
                  "desc": "An object that may be \"refable\"."
                }
              ]
            }
          ],
          "desc": "<p>An object is \"refable\" if it implements the Node.js \"Refable protocol\".\nSpecifically, this means that the object implements the <code>Symbol.for('nodejs.ref')</code>\nand <code>Symbol.for('nodejs.unref')</code> methods. \"Ref'd\" objects will keep the Node.js\nevent loop alive, while \"unref'd\" objects will not. Historically, this was\nimplemented by using <code>ref()</code> and <code>unref()</code> methods directly on the objects.\nThis pattern, however, is being deprecated in favor of the \"Refable protocol\"\nin order to better support Web Platform API types whose APIs cannot be modified\nto add <code>ref()</code> and <code>unref()</code> methods but still need to support that behavior.</p>"
        },
        {
          "textRaw": "`process.resourceUsage()`",
          "name": "resourceUsage",
          "type": "method",
          "meta": {
            "added": [
              "v12.6.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {Object} the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a `uv_rusage_t` struct.",
                "name": "return",
                "type": "Object",
                "desc": "the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a `uv_rusage_t` struct.",
                "options": [
                  {
                    "textRaw": "`userCPUTime` {integer} maps to `ru_utime` computed in microseconds. It is the same value as `process.cpuUsage().user`.",
                    "name": "userCPUTime",
                    "type": "integer",
                    "desc": "maps to `ru_utime` computed in microseconds. It is the same value as `process.cpuUsage().user`."
                  },
                  {
                    "textRaw": "`systemCPUTime` {integer} maps to `ru_stime` computed in microseconds. It is the same value as `process.cpuUsage().system`.",
                    "name": "systemCPUTime",
                    "type": "integer",
                    "desc": "maps to `ru_stime` computed in microseconds. It is the same value as `process.cpuUsage().system`."
                  },
                  {
                    "textRaw": "`maxRSS` {integer} maps to `ru_maxrss` which is the maximum resident set size used in kibibytes (1024 bytes).",
                    "name": "maxRSS",
                    "type": "integer",
                    "desc": "maps to `ru_maxrss` which is the maximum resident set size used in kibibytes (1024 bytes)."
                  },
                  {
                    "textRaw": "`sharedMemorySize` {integer} maps to `ru_ixrss` but is not supported by any platform.",
                    "name": "sharedMemorySize",
                    "type": "integer",
                    "desc": "maps to `ru_ixrss` but is not supported by any platform."
                  },
                  {
                    "textRaw": "`unsharedDataSize` {integer} maps to `ru_idrss` but is not supported by any platform.",
                    "name": "unsharedDataSize",
                    "type": "integer",
                    "desc": "maps to `ru_idrss` but is not supported by any platform."
                  },
                  {
                    "textRaw": "`unsharedStackSize` {integer} maps to `ru_isrss` but is not supported by any platform.",
                    "name": "unsharedStackSize",
                    "type": "integer",
                    "desc": "maps to `ru_isrss` but is not supported by any platform."
                  },
                  {
                    "textRaw": "`minorPageFault` {integer} maps to `ru_minflt` which is the number of minor page faults for the process, see this article for more details.",
                    "name": "minorPageFault",
                    "type": "integer",
                    "desc": "maps to `ru_minflt` which is the number of minor page faults for the process, see this article for more details."
                  },
                  {
                    "textRaw": "`majorPageFault` {integer} maps to `ru_majflt` which is the number of major page faults for the process, see this article for more details. This field is not supported on Windows.",
                    "name": "majorPageFault",
                    "type": "integer",
                    "desc": "maps to `ru_majflt` which is the number of major page faults for the process, see this article for more details. This field is not supported on Windows."
                  },
                  {
                    "textRaw": "`swappedOut` {integer} maps to `ru_nswap` but is not supported by any platform.",
                    "name": "swappedOut",
                    "type": "integer",
                    "desc": "maps to `ru_nswap` but is not supported by any platform."
                  },
                  {
                    "textRaw": "`fsRead` {integer} maps to `ru_inblock` which is the number of times the file system had to perform input.",
                    "name": "fsRead",
                    "type": "integer",
                    "desc": "maps to `ru_inblock` which is the number of times the file system had to perform input."
                  },
                  {
                    "textRaw": "`fsWrite` {integer} maps to `ru_oublock` which is the number of times the file system had to perform output.",
                    "name": "fsWrite",
                    "type": "integer",
                    "desc": "maps to `ru_oublock` which is the number of times the file system had to perform output."
                  },
                  {
                    "textRaw": "`ipcSent` {integer} maps to `ru_msgsnd` but is not supported by any platform.",
                    "name": "ipcSent",
                    "type": "integer",
                    "desc": "maps to `ru_msgsnd` but is not supported by any platform."
                  },
                  {
                    "textRaw": "`ipcReceived` {integer} maps to `ru_msgrcv` but is not supported by any platform.",
                    "name": "ipcReceived",
                    "type": "integer",
                    "desc": "maps to `ru_msgrcv` but is not supported by any platform."
                  },
                  {
                    "textRaw": "`signalsCount` {integer} maps to `ru_nsignals` but is not supported by any platform.",
                    "name": "signalsCount",
                    "type": "integer",
                    "desc": "maps to `ru_nsignals` but is not supported by any platform."
                  },
                  {
                    "textRaw": "`voluntaryContextSwitches` {integer} maps to `ru_nvcsw` which is the number of times a CPU context switch resulted due to a process voluntarily giving up the processor before its time slice was completed (usually to await availability of a resource). This field is not supported on Windows.",
                    "name": "voluntaryContextSwitches",
                    "type": "integer",
                    "desc": "maps to `ru_nvcsw` which is the number of times a CPU context switch resulted due to a process voluntarily giving up the processor before its time slice was completed (usually to await availability of a resource). This field is not supported on Windows."
                  },
                  {
                    "textRaw": "`involuntaryContextSwitches` {integer} maps to `ru_nivcsw` which is the number of times a CPU context switch resulted due to a higher priority process becoming runnable or because the current process exceeded its time slice. This field is not supported on Windows.",
                    "name": "involuntaryContextSwitches",
                    "type": "integer",
                    "desc": "maps to `ru_nivcsw` which is the number of times a CPU context switch resulted due to a higher priority process becoming runnable or because the current process exceeded its time slice. This field is not supported on Windows."
                  }
                ]
              }
            }
          ],
          "desc": "<pre><code class=\"language-mjs\">import { resourceUsage } from 'node:process';\n\nconsole.log(resourceUsage());\n/*\n  Will output:\n  {\n    userCPUTime: 82872,\n    systemCPUTime: 4143,\n    maxRSS: 33164,\n    sharedMemorySize: 0,\n    unsharedDataSize: 0,\n    unsharedStackSize: 0,\n    minorPageFault: 2469,\n    majorPageFault: 0,\n    swappedOut: 0,\n    fsRead: 0,\n    fsWrite: 8,\n    ipcSent: 0,\n    ipcReceived: 0,\n    signalsCount: 0,\n    voluntaryContextSwitches: 79,\n    involuntaryContextSwitches: 1\n  }\n*/\n</code></pre>\n<pre><code class=\"language-cjs\">const { resourceUsage } = require('node:process');\n\nconsole.log(resourceUsage());\n/*\n  Will output:\n  {\n    userCPUTime: 82872,\n    systemCPUTime: 4143,\n    maxRSS: 33164,\n    sharedMemorySize: 0,\n    unsharedDataSize: 0,\n    unsharedStackSize: 0,\n    minorPageFault: 2469,\n    majorPageFault: 0,\n    swappedOut: 0,\n    fsRead: 0,\n    fsWrite: 8,\n    ipcSent: 0,\n    ipcReceived: 0,\n    signalsCount: 0,\n    voluntaryContextSwitches: 79,\n    involuntaryContextSwitches: 1\n  }\n*/\n</code></pre>"
        },
        {
          "textRaw": "`process.send(message[, sendHandle[, options]][, callback])`",
          "name": "send",
          "type": "method",
          "meta": {
            "added": [
              "v0.5.9"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`message` {Object}",
                  "name": "message",
                  "type": "Object"
                },
                {
                  "textRaw": "`sendHandle` {net.Server|net.Socket}",
                  "name": "sendHandle",
                  "type": "net.Server|net.Socket",
                  "optional": true
                },
                {
                  "textRaw": "`options` {Object} used to parameterize the sending of certain types of handles.`options` supports the following properties:",
                  "name": "options",
                  "type": "Object",
                  "desc": "used to parameterize the sending of certain types of handles.`options` supports the following properties:",
                  "options": [
                    {
                      "textRaw": "`keepOpen` {boolean} A value that can be used when passing instances of `net.Socket`. When `true`, the socket is kept open in the sending process. **Default:** `false`.",
                      "name": "keepOpen",
                      "type": "boolean",
                      "default": "`false`",
                      "desc": "A value that can be used when passing instances of `net.Socket`. When `true`, the socket is kept open in the sending process."
                    }
                  ],
                  "optional": true
                },
                {
                  "textRaw": "`callback` {Function}",
                  "name": "callback",
                  "type": "Function",
                  "optional": true
                }
              ],
              "return": {
                "textRaw": "Returns: {boolean}",
                "name": "return",
                "type": "boolean"
              }
            }
          ],
          "desc": "<p>If Node.js is spawned with an IPC channel, the <code>process.send()</code> method can be\nused to send messages to the parent process. Messages will be received as a\n<a href=\"child_process.html#event-message\"><code>'message'</code></a> event on the parent's <a href=\"child_process.html#class-childprocess\"><code>ChildProcess</code></a> object.</p>\n<p>If Node.js was not spawned with an IPC channel, <code>process.send</code> will be\n<code>undefined</code>.</p>\n<p>The message goes through serialization and parsing. The resulting message might\nnot be the same as what is originally sent.</p>"
        },
        {
          "textRaw": "`process.setegid(id)`",
          "name": "setegid",
          "type": "method",
          "meta": {
            "added": [
              "v2.0.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`id` {string|number} A group name or ID",
                  "name": "id",
                  "type": "string|number",
                  "desc": "A group name or ID"
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.setegid()</code> method sets the effective group identity of the process.\n(See <a href=\"http://man7.org/linux/man-pages/man2/setegid.2.html\"><code>setegid(2)</code></a>.) The <code>id</code> can be passed as either a numeric ID or a group\nname string. If a group name is specified, this method blocks while resolving\nthe associated a numeric ID.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.getegid &#x26;&#x26; process.setegid) {\n  console.log(`Current gid: ${process.getegid()}`);\n  try {\n    process.setegid(501);\n    console.log(`New gid: ${process.getegid()}`);\n  } catch (err) {\n    console.error(`Failed to set gid: ${err}`);\n  }\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.getegid &#x26;&#x26; process.setegid) {\n  console.log(`Current gid: ${process.getegid()}`);\n  try {\n    process.setegid(501);\n    console.log(`New gid: ${process.getegid()}`);\n  } catch (err) {\n    console.error(`Failed to set gid: ${err}`);\n  }\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).\nThis feature is not available in <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>"
        },
        {
          "textRaw": "`process.seteuid(id)`",
          "name": "seteuid",
          "type": "method",
          "meta": {
            "added": [
              "v2.0.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`id` {string|number} A user name or ID",
                  "name": "id",
                  "type": "string|number",
                  "desc": "A user name or ID"
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.seteuid()</code> method sets the effective user identity of the process.\n(See <a href=\"http://man7.org/linux/man-pages/man2/seteuid.2.html\"><code>seteuid(2)</code></a>.) The <code>id</code> can be passed as either a numeric ID or a username\nstring. If a username is specified, the method blocks while resolving the\nassociated numeric ID.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.geteuid &#x26;&#x26; process.seteuid) {\n  console.log(`Current uid: ${process.geteuid()}`);\n  try {\n    process.seteuid(501);\n    console.log(`New uid: ${process.geteuid()}`);\n  } catch (err) {\n    console.error(`Failed to set uid: ${err}`);\n  }\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.geteuid &#x26;&#x26; process.seteuid) {\n  console.log(`Current uid: ${process.geteuid()}`);\n  try {\n    process.seteuid(501);\n    console.log(`New uid: ${process.geteuid()}`);\n  } catch (err) {\n    console.error(`Failed to set uid: ${err}`);\n  }\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).\nThis feature is not available in <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>"
        },
        {
          "textRaw": "`process.setgid(id)`",
          "name": "setgid",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.31"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`id` {string|number} The group name or ID",
                  "name": "id",
                  "type": "string|number",
                  "desc": "The group name or ID"
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.setgid()</code> method sets the group identity of the process. (See\n<a href=\"http://man7.org/linux/man-pages/man2/setgid.2.html\"><code>setgid(2)</code></a>.) The <code>id</code> can be passed as either a numeric ID or a group name\nstring. If a group name is specified, this method blocks while resolving the\nassociated numeric ID.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.getgid &#x26;&#x26; process.setgid) {\n  console.log(`Current gid: ${process.getgid()}`);\n  try {\n    process.setgid(501);\n    console.log(`New gid: ${process.getgid()}`);\n  } catch (err) {\n    console.error(`Failed to set gid: ${err}`);\n  }\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.getgid &#x26;&#x26; process.setgid) {\n  console.log(`Current gid: ${process.getgid()}`);\n  try {\n    process.setgid(501);\n    console.log(`New gid: ${process.getgid()}`);\n  } catch (err) {\n    console.error(`Failed to set gid: ${err}`);\n  }\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).\nThis feature is not available in <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>"
        },
        {
          "textRaw": "`process.setgroups(groups)`",
          "name": "setgroups",
          "type": "method",
          "meta": {
            "added": [
              "v0.9.4"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`groups` {integer}[]",
                  "name": "groups",
                  "type": "integer",
                  "desc": "[]"
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.setgroups()</code> method sets the supplementary group IDs for the\nNode.js process. This is a privileged operation that requires the Node.js\nprocess to have <code>root</code> or the <code>CAP_SETGID</code> capability.</p>\n<p>The <code>groups</code> array can contain numeric group IDs, group names, or both.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.getgroups &#x26;&#x26; process.setgroups) {\n  try {\n    process.setgroups([501]);\n    console.log(process.getgroups()); // new groups\n  } catch (err) {\n    console.error(`Failed to set groups: ${err}`);\n  }\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.getgroups &#x26;&#x26; process.setgroups) {\n  try {\n    process.setgroups([501]);\n    console.log(process.getgroups()); // new groups\n  } catch (err) {\n    console.error(`Failed to set groups: ${err}`);\n  }\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).\nThis feature is not available in <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>"
        },
        {
          "textRaw": "`process.setuid(id)`",
          "name": "setuid",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.28"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`id` {integer|string}",
                  "name": "id",
                  "type": "integer|string"
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.setuid(id)</code> method sets the user identity of the process. (See\n<a href=\"http://man7.org/linux/man-pages/man2/setuid.2.html\"><code>setuid(2)</code></a>.) The <code>id</code> can be passed as either a numeric ID or a username string.\nIf a username is specified, the method blocks while resolving the associated\nnumeric ID.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nif (process.getuid &#x26;&#x26; process.setuid) {\n  console.log(`Current uid: ${process.getuid()}`);\n  try {\n    process.setuid(501);\n    console.log(`New uid: ${process.getuid()}`);\n  } catch (err) {\n    console.error(`Failed to set uid: ${err}`);\n  }\n}\n</code></pre>\n<pre><code class=\"language-cjs\">if (process.getuid &#x26;&#x26; process.setuid) {\n  console.log(`Current uid: ${process.getuid()}`);\n  try {\n    process.setuid(501);\n    console.log(`New uid: ${process.getuid()}`);\n  } catch (err) {\n    console.error(`Failed to set uid: ${err}`);\n  }\n}\n</code></pre>\n<p>This function is only available on POSIX platforms (i.e. not Windows or\nAndroid).\nThis feature is not available in <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.</p>"
        },
        {
          "textRaw": "`process.setSourceMapsEnabled(val)`",
          "name": "setSourceMapsEnabled",
          "type": "method",
          "meta": {
            "added": [
              "v16.6.0",
              "v14.18.0"
            ],
            "changes": []
          },
          "stability": 1,
          "stabilityText": "Experimental: Use `module.setSourceMapsSupport()` instead.",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`val` {boolean}",
                  "name": "val",
                  "type": "boolean"
                }
              ]
            }
          ],
          "desc": "<p>This function enables or disables the <a href=\"https://tc39.es/ecma426/\">Source Map</a> support for\nstack traces.</p>\n<p>It provides same features as launching Node.js process with commandline options\n<code>--enable-source-maps</code>.</p>\n<p>Only source maps in JavaScript files that are loaded after source maps has been\nenabled will be parsed and loaded.</p>\n<p>This implies calling <code>module.setSourceMapsSupport()</code> with an option\n<code>{ nodeModules: true, generatedCode: true }</code>.</p>"
        },
        {
          "textRaw": "`process.setUncaughtExceptionCaptureCallback(fn)`",
          "name": "setUncaughtExceptionCaptureCallback",
          "type": "method",
          "meta": {
            "added": [
              "v9.3.0"
            ],
            "changes": [
              {
                "version": "v25.9.0",
                "pr-url": "https://github.com/nodejs/node/pull/61227",
                "description": "Use `process.addUncaughtExceptionCaptureCallback()` to register multiple callbacks."
              }
            ]
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`fn` {Function|null}",
                  "name": "fn",
                  "type": "Function|null"
                }
              ]
            }
          ],
          "desc": "<p>The <code>process.setUncaughtExceptionCaptureCallback()</code> function sets a function\nthat will be invoked when an uncaught exception occurs, which will receive the\nexception value itself as its first argument.</p>\n<p>If such a function is set, the <a href=\"#event-uncaughtexception\"><code>'uncaughtException'</code></a> event will\nnot be emitted. If <code>--abort-on-uncaught-exception</code> was passed from the\ncommand line or set through <a href=\"v8.html#v8setflagsfromstringflags\"><code>v8.setFlagsFromString()</code></a>, the process will\nnot abort. Actions configured to take place on exceptions such as report\ngenerations will be affected too</p>\n<p>To unset the capture function,\n<code>process.setUncaughtExceptionCaptureCallback(null)</code> may be used. Calling this\nmethod with a non-<code>null</code> argument while another capture function is set will\nthrow an error.</p>\n<p>To register multiple callbacks that can coexist, use\n<a href=\"#processadduncaughtexceptioncapturecallbackfn\"><code>process.addUncaughtExceptionCaptureCallback()</code></a> instead.</p>"
        },
        {
          "textRaw": "`process.threadCpuUsage([previousValue])`",
          "name": "threadCpuUsage",
          "type": "method",
          "meta": {
            "added": [
              "v23.9.0",
              "v22.19.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`previousValue` {Object} A previous return value from calling `process.threadCpuUsage()`",
                  "name": "previousValue",
                  "type": "Object",
                  "desc": "A previous return value from calling `process.threadCpuUsage()`",
                  "optional": true
                }
              ],
              "return": {
                "textRaw": "Returns: {Object}",
                "name": "return",
                "type": "Object",
                "options": [
                  {
                    "textRaw": "`user` {integer}",
                    "name": "user",
                    "type": "integer"
                  },
                  {
                    "textRaw": "`system` {integer}",
                    "name": "system",
                    "type": "integer"
                  }
                ]
              }
            }
          ],
          "desc": "<p>The <code>process.threadCpuUsage()</code> method returns the user and system CPU time usage of\nthe current worker thread, in an object with properties <code>user</code> and <code>system</code>, whose\nvalues are microsecond values (millionth of a second).</p>\n<p>The result of a previous call to <code>process.threadCpuUsage()</code> can be passed as the\nargument to the function, to get a diff reading.</p>"
        },
        {
          "textRaw": "`process.umask()`",
          "name": "umask",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.19"
            ],
            "changes": [
              {
                "version": [
                  "v14.0.0",
                  "v12.19.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/32499",
                "description": "Calling `process.umask()` with no arguments is deprecated."
              }
            ]
          },
          "stability": 0,
          "stabilityText": "Deprecated. Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential security vulnerability. There is no safe, cross-platform alternative API.",
          "signatures": [
            {
              "params": []
            }
          ],
          "desc": "<p><code>process.umask()</code> returns the Node.js process's file mode creation mask. Child\nprocesses inherit the mask from the parent process.</p>"
        },
        {
          "textRaw": "`process.umask(mask)`",
          "name": "umask",
          "type": "method",
          "meta": {
            "added": [
              "v0.1.19"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`mask` {string|integer}",
                  "name": "mask",
                  "type": "string|integer"
                }
              ]
            }
          ],
          "desc": "<p><code>process.umask(mask)</code> sets the Node.js process's file mode creation mask. Child\nprocesses inherit the mask from the parent process. Returns the previous mask.</p>\n<pre><code class=\"language-mjs\">import { umask } from 'node:process';\n\nconst newmask = 0o022;\nconst oldmask = umask(newmask);\nconsole.log(\n  `Changed umask from ${oldmask.toString(8)} to ${newmask.toString(8)}`,\n);\n</code></pre>\n<pre><code class=\"language-cjs\">const { umask } = require('node:process');\n\nconst newmask = 0o022;\nconst oldmask = umask(newmask);\nconsole.log(\n  `Changed umask from ${oldmask.toString(8)} to ${newmask.toString(8)}`,\n);\n</code></pre>\n<p>In <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads, <code>process.umask(mask)</code> will throw an exception.</p>"
        },
        {
          "textRaw": "`process.unref(maybeRefable)`",
          "name": "unref",
          "type": "method",
          "meta": {
            "added": [
              "v23.6.0",
              "v22.14.0"
            ],
            "changes": []
          },
          "stability": 1,
          "stabilityText": "Experimental",
          "signatures": [
            {
              "params": [
                {
                  "textRaw": "`maybeRefable` {any} An object that may be \"unref'd\".",
                  "name": "maybeRefable",
                  "type": "any",
                  "desc": "An object that may be \"unref'd\"."
                }
              ]
            }
          ],
          "desc": "<p>An object is \"unrefable\" if it implements the Node.js \"Refable protocol\".\nSpecifically, this means that the object implements the <code>Symbol.for('nodejs.ref')</code>\nand <code>Symbol.for('nodejs.unref')</code> methods. \"Ref'd\" objects will keep the Node.js\nevent loop alive, while \"unref'd\" objects will not. Historically, this was\nimplemented by using <code>ref()</code> and <code>unref()</code> methods directly on the objects.\nThis pattern, however, is being deprecated in favor of the \"Refable protocol\"\nin order to better support Web Platform API types whose APIs cannot be modified\nto add <code>ref()</code> and <code>unref()</code> methods but still need to support that behavior.</p>"
        },
        {
          "textRaw": "`process.uptime()`",
          "name": "uptime",
          "type": "method",
          "meta": {
            "added": [
              "v0.5.0"
            ],
            "changes": []
          },
          "signatures": [
            {
              "params": [],
              "return": {
                "textRaw": "Returns: {number}",
                "name": "return",
                "type": "number"
              }
            }
          ],
          "desc": "<p>The <code>process.uptime()</code> method returns the number of seconds the current Node.js\nprocess has been running.</p>\n<p>The return value includes fractions of a second. Use <code>Math.floor()</code> to get whole\nseconds.</p>"
        }
      ],
      "properties": [
        {
          "textRaw": "Type: {Set}",
          "name": "allowedNodeEnvironmentFlags",
          "type": "Set",
          "meta": {
            "added": [
              "v10.10.0"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.allowedNodeEnvironmentFlags</code> property is a special,\nread-only <code>Set</code> of flags allowable within the <a href=\"cli.html#node_optionsoptions\"><code>NODE_OPTIONS</code></a>\nenvironment variable.</p>\n<p><code>process.allowedNodeEnvironmentFlags</code> extends <code>Set</code>, but overrides\n<code>Set.prototype.has</code> to recognize several different possible flag\nrepresentations. <code>process.allowedNodeEnvironmentFlags.has()</code> will\nreturn <code>true</code> in the following cases:</p>\n<ul>\n<li>Flags may omit leading single (<code>-</code>) or double (<code>--</code>) dashes; e.g.,\n<code>inspect-brk</code> for <code>--inspect-brk</code>, or <code>r</code> for <code>-r</code>.</li>\n<li>Flags passed through to V8 (as listed in <code>--v8-options</code>) may replace\none or more <em>non-leading</em> dashes for an underscore, or vice-versa;\ne.g., <code>--perf_basic_prof</code>, <code>--perf-basic-prof</code>, <code>--perf_basic-prof</code>,\netc.</li>\n<li>Flags may contain one or more equals (<code>=</code>) characters; all\ncharacters after and including the first equals will be ignored;\ne.g., <code>--stack-trace-limit=100</code>.</li>\n<li>Flags <em>must</em> be allowable within <a href=\"cli.html#node_optionsoptions\"><code>NODE_OPTIONS</code></a>.</li>\n</ul>\n<p>When iterating over <code>process.allowedNodeEnvironmentFlags</code>, flags will\nappear only <em>once</em>; each will begin with one or more dashes. Flags\npassed through to V8 will contain underscores instead of non-leading\ndashes:</p>\n<pre><code class=\"language-mjs\">import { allowedNodeEnvironmentFlags } from 'node:process';\n\nallowedNodeEnvironmentFlags.forEach((flag) => {\n  // -r\n  // --inspect-brk\n  // --abort_on_uncaught_exception\n  // ...\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const { allowedNodeEnvironmentFlags } = require('node:process');\n\nallowedNodeEnvironmentFlags.forEach((flag) => {\n  // -r\n  // --inspect-brk\n  // --abort_on_uncaught_exception\n  // ...\n});\n</code></pre>\n<p>The methods <code>add()</code>, <code>clear()</code>, and <code>delete()</code> of\n<code>process.allowedNodeEnvironmentFlags</code> do nothing, and will fail\nsilently.</p>\n<p>If Node.js was compiled <em>without</em> <a href=\"cli.html#node_optionsoptions\"><code>NODE_OPTIONS</code></a> support (shown in\n<a href=\"#processconfig\"><code>process.config</code></a>), <code>process.allowedNodeEnvironmentFlags</code> will\ncontain what <em>would have</em> been allowable.</p>"
        },
        {
          "textRaw": "Type: {string}",
          "name": "arch",
          "type": "string",
          "meta": {
            "added": [
              "v0.5.0"
            ],
            "changes": []
          },
          "desc": "<p>The operating system CPU architecture for which the Node.js binary was compiled.\nPossible values are: <code>'arm'</code>, <code>'arm64'</code>, <code>'ia32'</code>, <code>'loong64'</code>, <code>'mips'</code>,\n<code>'mipsel'</code>, <code>'ppc64'</code>, <code>'riscv64'</code>, <code>'s390'</code>, <code>'s390x'</code>, and <code>'x64'</code>.</p>\n<pre><code class=\"language-mjs\">import { arch } from 'node:process';\n\nconsole.log(`This processor architecture is ${arch}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { arch } = require('node:process');\n\nconsole.log(`This processor architecture is ${arch}`);\n</code></pre>"
        },
        {
          "textRaw": "Type: {string}[]",
          "name": "argv",
          "type": "string",
          "meta": {
            "added": [
              "v0.1.27"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.argv</code> property returns an array containing the command-line\narguments passed when the Node.js process was launched. The first element will\nbe <a href=\"#processexecpath\"><code>process.execPath</code></a>. See <code>process.argv0</code> if access to the original value\nof <code>argv[0]</code> is needed. If a <a href=\"https://nodejs.org/api/cli.html#program-entry-point\">program entry point</a> was provided, the second element\nwill be the absolute path to it. The remaining elements are additional command-line\narguments.</p>\n<p>For example, assuming the following script for <code>process-args.js</code>:</p>\n<pre><code class=\"language-mjs\">import { argv } from 'node:process';\n\n// print process.argv\nargv.forEach((val, index) => {\n  console.log(`${index}: ${val}`);\n});\n</code></pre>\n<pre><code class=\"language-cjs\">const { argv } = require('node:process');\n\n// print process.argv\nargv.forEach((val, index) => {\n  console.log(`${index}: ${val}`);\n});\n</code></pre>\n<p>Launching the Node.js process as:</p>\n<pre><code class=\"language-bash\">node process-args.js one two=three four\n</code></pre>\n<p>Would generate the output:</p>\n<pre><code class=\"language-text\">0: /usr/local/bin/node\n1: /Users/mjr/work/node/process-args.js\n2: one\n3: two=three\n4: four\n</code></pre>",
          "shortDesc": "[]"
        },
        {
          "textRaw": "Type: {string}",
          "name": "argv0",
          "type": "string",
          "meta": {
            "added": [
              "v6.4.0"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.argv0</code> property stores a read-only copy of the original value of\n<code>argv[0]</code> passed when Node.js starts.</p>\n<pre><code class=\"language-console\">$ bash -c 'exec -a customArgv0 ./node'\n> process.argv[0]\n'/Volumes/code/external/node/out/Release/node'\n> process.argv0\n'customArgv0'\n</code></pre>"
        },
        {
          "textRaw": "Type: {Object}",
          "name": "channel",
          "type": "Object",
          "meta": {
            "added": [
              "v7.1.0"
            ],
            "changes": [
              {
                "version": "v14.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/30165",
                "description": "The object no longer accidentally exposes native C++ bindings."
              }
            ]
          },
          "desc": "<p>If the Node.js process was spawned with an IPC channel (see the\n<a href=\"child_process.html\">Child Process</a> documentation), the <code>process.channel</code>\nproperty is a reference to the IPC channel. If no IPC channel exists, this\nproperty is <code>undefined</code>.</p>",
          "methods": [
            {
              "textRaw": "`process.channel.ref()`",
              "name": "ref",
              "type": "method",
              "meta": {
                "added": [
                  "v7.1.0"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "params": []
                }
              ],
              "desc": "<p>This method makes the IPC channel keep the event loop of the process\nrunning if <code>.unref()</code> has been called before.</p>\n<p>Typically, this is managed through the number of <code>'disconnect'</code> and <code>'message'</code>\nlisteners on the <code>process</code> object. However, this method can be used to\nexplicitly request a specific behavior.</p>"
            },
            {
              "textRaw": "`process.channel.unref()`",
              "name": "unref",
              "type": "method",
              "meta": {
                "added": [
                  "v7.1.0"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "params": []
                }
              ],
              "desc": "<p>This method makes the IPC channel not keep the event loop of the process\nrunning, and lets it finish even while the channel is open.</p>\n<p>Typically, this is managed through the number of <code>'disconnect'</code> and <code>'message'</code>\nlisteners on the <code>process</code> object. However, this method can be used to\nexplicitly request a specific behavior.</p>"
            }
          ]
        },
        {
          "textRaw": "Type: {Object}",
          "name": "config",
          "type": "Object",
          "meta": {
            "added": [
              "v0.7.7"
            ],
            "changes": [
              {
                "version": "v19.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/43627",
                "description": "The `process.config` object is now frozen."
              },
              {
                "version": "v16.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/36902",
                "description": "Modifying process.config has been deprecated."
              }
            ]
          },
          "desc": "<p>The <code>process.config</code> property returns a frozen <code>Object</code> containing the\nJavaScript representation of the configure options used to compile the current\nNode.js executable. This is the same as the <code>config.gypi</code> file that was produced\nwhen running the <code>./configure</code> script.</p>\n<p>An example of the possible output looks like:</p>\n<pre><code class=\"language-json\">{\n  \"target_defaults\":\n   { \"cflags\": [],\n     \"default_configuration\": \"Release\",\n     \"defines\": [],\n     \"include_dirs\": [],\n     \"libraries\": [] },\n  \"variables\":\n   {\n     \"host_arch\": \"x64\",\n     \"napi_build_version\": 5,\n     \"node_install_npm\": \"true\",\n     \"node_prefix\": \"\",\n     \"node_shared_cares\": \"false\",\n     \"node_shared_http_parser\": \"false\",\n     \"node_shared_libuv\": \"false\",\n     \"node_shared_zlib\": \"false\",\n     \"node_use_openssl\": \"true\",\n     \"node_shared_openssl\": \"false\",\n     \"target_arch\": \"x64\",\n     \"v8_use_snapshot\": 1\n   }\n}\n</code></pre>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "connected",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.7.2"
            ],
            "changes": []
          },
          "desc": "<p>If the Node.js process is spawned with an IPC channel (see the <a href=\"child_process.html\">Child Process</a>\nand <a href=\"cluster.html\">Cluster</a> documentation), the <code>process.connected</code> property will return\n<code>true</code> so long as the IPC channel is connected and will return <code>false</code> after\n<code>process.disconnect()</code> is called.</p>\n<p>Once <code>process.connected</code> is <code>false</code>, it is no longer possible to send messages\nover the IPC channel using <code>process.send()</code>.</p>"
        },
        {
          "textRaw": "Type: {number}",
          "name": "debugPort",
          "type": "number",
          "meta": {
            "added": [
              "v0.7.2"
            ],
            "changes": []
          },
          "desc": "<p>The port used by the Node.js debugger when enabled.</p>\n<pre><code class=\"language-mjs\">import process from 'node:process';\n\nprocess.debugPort = 5858;\n</code></pre>\n<pre><code class=\"language-cjs\">process.debugPort = 5858;\n</code></pre>"
        },
        {
          "textRaw": "Type: {Object}",
          "name": "env",
          "type": "Object",
          "meta": {
            "added": [
              "v0.1.27"
            ],
            "changes": [
              {
                "version": "v11.14.0",
                "pr-url": "https://github.com/nodejs/node/pull/26544",
                "description": "Worker threads will now use a copy of the parent thread's `process.env` by default, configurable through the `env` option of the `Worker` constructor."
              },
              {
                "version": "v10.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/18990",
                "description": "Implicit conversion of variable value to string is deprecated."
              }
            ]
          },
          "desc": "<p>The <code>process.env</code> property returns an object containing the user environment.\nSee <a href=\"http://man7.org/linux/man-pages/man7/environ.7.html\"><code>environ(7)</code></a>.</p>\n<p>An example of this object looks like:</p>\n<pre><code class=\"language-json\">{\n  \"TERM\": \"xterm-256color\",\n  \"SHELL\": \"/usr/local/bin/bash\",\n  \"USER\": \"maciej\",\n  \"PATH\": \"~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin\",\n  \"PWD\": \"/Users/maciej\",\n  \"EDITOR\": \"vim\",\n  \"SHLVL\": \"1\",\n  \"HOME\": \"/Users/maciej\",\n  \"LOGNAME\": \"maciej\",\n  \"_\": \"/usr/local/bin/node\"\n}\n</code></pre>\n<p>It is possible to modify this object, but such modifications will not be\nreflected outside the Node.js process, or (unless explicitly requested)\nto other <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads.\nIn other words, the following example would not work:</p>\n<pre><code class=\"language-bash\">node -e 'process.env.foo = \"bar\"' &#x26;&#x26; echo $foo\n</code></pre>\n<p>While the following will:</p>\n<pre><code class=\"language-mjs\">import { env } from 'node:process';\n\nenv.foo = 'bar';\nconsole.log(env.foo);\n</code></pre>\n<pre><code class=\"language-cjs\">const { env } = require('node:process');\n\nenv.foo = 'bar';\nconsole.log(env.foo);\n</code></pre>\n<p>Assigning a property on <code>process.env</code> will implicitly convert the value\nto a string. <strong>This behavior is deprecated.</strong> Future versions of Node.js may\nthrow an error when the value is not a string, number, or boolean.</p>\n<pre><code class=\"language-mjs\">import { env } from 'node:process';\n\nenv.test = null;\nconsole.log(env.test);\n// => 'null'\nenv.test = undefined;\nconsole.log(env.test);\n// => 'undefined'\n</code></pre>\n<pre><code class=\"language-cjs\">const { env } = require('node:process');\n\nenv.test = null;\nconsole.log(env.test);\n// => 'null'\nenv.test = undefined;\nconsole.log(env.test);\n// => 'undefined'\n</code></pre>\n<p>Use <code>delete</code> to delete a property from <code>process.env</code>.</p>\n<pre><code class=\"language-mjs\">import { env } from 'node:process';\n\nenv.TEST = 1;\ndelete env.TEST;\nconsole.log(env.TEST);\n// => undefined\n</code></pre>\n<pre><code class=\"language-cjs\">const { env } = require('node:process');\n\nenv.TEST = 1;\ndelete env.TEST;\nconsole.log(env.TEST);\n// => undefined\n</code></pre>\n<p>On Windows operating systems, environment variables are case-insensitive.</p>\n<pre><code class=\"language-mjs\">import { env } from 'node:process';\n\nenv.TEST = 1;\nconsole.log(env.test);\n// => 1\n</code></pre>\n<pre><code class=\"language-cjs\">const { env } = require('node:process');\n\nenv.TEST = 1;\nconsole.log(env.test);\n// => 1\n</code></pre>\n<p>Unless explicitly specified when creating a <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> instance,\neach <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> thread has its own copy of <code>process.env</code>, based on its\nparent thread's <code>process.env</code>, or whatever was specified as the <code>env</code> option\nto the <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> constructor. Changes to <code>process.env</code> will not be visible\nacross <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads, and only the main thread can make changes that\nare visible to the operating system or to native add-ons. On Windows, a copy of\n<code>process.env</code> on a <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> instance operates in a case-sensitive manner\nunlike the main thread.</p>"
        },
        {
          "textRaw": "Type: {string}[]",
          "name": "execArgv",
          "type": "string",
          "meta": {
            "added": [
              "v0.7.7"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.execArgv</code> property returns the set of Node.js-specific command-line\noptions passed when the Node.js process was launched. These options do not\nappear in the array returned by the <a href=\"#processargv\"><code>process.argv</code></a> property, and do not\ninclude the Node.js executable, the name of the script, or any options following\nthe script name. These options are useful in order to spawn child processes with\nthe same execution environment as the parent.</p>\n<pre><code class=\"language-bash\">node --icu-data-dir=./foo --require ./bar.js script.js --version\n</code></pre>\n<p>Results in <code>process.execArgv</code>:</p>\n<pre><code class=\"language-json\">[\"--icu-data-dir=./foo\", \"--require\", \"./bar.js\"]\n</code></pre>\n<p>And <code>process.argv</code>:</p>\n<pre><code class=\"language-json\">[\"/usr/local/bin/node\", \"script.js\", \"--version\"]\n</code></pre>\n<p>Refer to <a href=\"worker_threads.html#new-workerfilename-options\"><code>Worker</code> constructor</a> for the detailed behavior of worker\nthreads with this property.</p>",
          "shortDesc": "[]"
        },
        {
          "textRaw": "Type: {string}",
          "name": "execPath",
          "type": "string",
          "meta": {
            "added": [
              "v0.1.100"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.execPath</code> property returns the absolute pathname of the executable\nthat started the Node.js process. Symbolic links, if any, are resolved.</p>\n<pre><code class=\"language-json\">\"/usr/local/bin/node\"\n</code></pre>"
        },
        {
          "textRaw": "Type: {integer|string|null|undefined} The exit code. For string type, only integer strings (e.g.,'1') are allowed. **Default:** `undefined`.",
          "name": "exitCode",
          "type": "integer|string|null|undefined",
          "meta": {
            "added": [
              "v0.11.8"
            ],
            "changes": [
              {
                "version": "v20.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/43716",
                "description": "Only accepts a code of type number, or of type string if it represents an integer."
              }
            ]
          },
          "default": "`undefined`",
          "desc": "<p>A number which will be the process exit code, when the process either\nexits gracefully, or is exited via <a href=\"#processexitcode\"><code>process.exit()</code></a> without specifying\na code.</p>\n<p>The value of <code>process.exitCode</code> can be updated by either assigning a value to\n<code>process.exitCode</code> or by passing an argument to <a href=\"#processexitcode\"><code>process.exit()</code></a>:</p>\n<pre><code class=\"language-console\">$ node -e 'process.exitCode = 9'; echo $?\n9\n$ node -e 'process.exit(42)'; echo $?\n42\n$ node -e 'process.exitCode = 9; process.exit(42)'; echo $?\n42\n</code></pre>\n<p>The value can also be set implicitly by Node.js when unrecoverable errors occur (e.g.\nsuch as the encountering of an unsettled top-level await). However explicit\nmanipulations of the exit code always take precedence over implicit ones:</p>\n<pre><code class=\"language-console\">$ node --input-type=module -e 'await new Promise(() => {})'; echo $?\n13\n$ node --input-type=module -e 'process.exitCode = 9; await new Promise(() => {})'; echo $?\n9\n</code></pre>",
          "shortDesc": "The exit code. For string type, only integer strings (e.g.,'1') are allowed."
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "cached_builtins",
          "type": "boolean",
          "meta": {
            "added": [
              "v12.0.0"
            ],
            "changes": []
          },
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build is caching builtin modules.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "debug",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.5.5"
            ],
            "changes": []
          },
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build is a debug build.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "inspector",
          "type": "boolean",
          "meta": {
            "added": [
              "v11.10.0"
            ],
            "changes": []
          },
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build includes the inspector.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "ipv6",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.5.3"
            ],
            "changes": [],
            "deprecated": [
              "v23.4.0",
              "v22.13.0"
            ]
          },
          "stability": 0,
          "stabilityText": "Deprecated. This property is always true, and any checks based on it are redundant.",
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build includes support for IPv6.</p>\n<p>Since all Node.js builds have IPv6 support, this value is always <code>true</code>.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "require_module",
          "type": "boolean",
          "meta": {
            "added": [
              "v23.0.0",
              "v22.10.0",
              "v20.19.0"
            ],
            "changes": []
          },
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build supports\n<a href=\"modules.html#loading-ecmascript-modules-using-require\">loading ECMAScript modules using <code>require()</code></a>.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "tls",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.5.3"
            ],
            "changes": []
          },
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build includes support for TLS.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "tls_alpn",
          "type": "boolean",
          "meta": {
            "added": [
              "v4.8.0"
            ],
            "changes": [],
            "deprecated": [
              "v23.4.0",
              "v22.13.0"
            ]
          },
          "stability": 0,
          "stabilityText": "Deprecated. Use `process.features.tls` instead.",
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build includes support for ALPN in TLS.</p>\n<p>In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support.\nThis value is therefore identical to that of <code>process.features.tls</code>.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "tls_ocsp",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.11.13"
            ],
            "changes": [],
            "deprecated": [
              "v23.4.0",
              "v22.13.0"
            ]
          },
          "stability": 0,
          "stabilityText": "Deprecated. Use `process.features.tls` instead.",
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build includes support for OCSP in TLS.</p>\n<p>In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support.\nThis value is therefore identical to that of <code>process.features.tls</code>.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "tls_sni",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.5.3"
            ],
            "changes": [],
            "deprecated": [
              "v23.4.0",
              "v22.13.0"
            ]
          },
          "stability": 0,
          "stabilityText": "Deprecated. Use `process.features.tls` instead.",
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build includes support for SNI in TLS.</p>\n<p>In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support.\nThis value is therefore identical to that of <code>process.features.tls</code>.</p>"
        },
        {
          "textRaw": "Type: {boolean|string}",
          "name": "typescript",
          "type": "boolean|string",
          "meta": {
            "added": [
              "v23.0.0",
              "v22.10.0"
            ],
            "changes": [
              {
                "version": "v26.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/61803",
                "description": "Removed `transform` value."
              },
              {
                "version": [
                  "v25.2.0",
                  "v24.12.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/60600",
                "description": "Type stripping is now stable."
              }
            ]
          },
          "stability": 1.2,
          "stabilityText": "Release candidate",
          "desc": "<p>A value that is <code>\"strip\"</code> by default, and <code>false</code> if\nNode.js is run with <code>--no-strip-types</code>.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "uv",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.5.3"
            ],
            "changes": [],
            "deprecated": [
              "v23.4.0",
              "v22.13.0"
            ]
          },
          "stability": 0,
          "stabilityText": "Deprecated. This property is always true, and any checks based on it are redundant.",
          "desc": "<p>A boolean value that is <code>true</code> if the current Node.js build includes support for libuv.</p>\n<p>Since it's not possible to build Node.js without libuv, this value is always <code>true</code>.</p>"
        },
        {
          "textRaw": "Type: {Object}",
          "name": "mainModule",
          "type": "Object",
          "meta": {
            "added": [
              "v0.1.17"
            ],
            "changes": [],
            "deprecated": [
              "v14.0.0"
            ]
          },
          "stability": 0,
          "stabilityText": "Deprecated: Use `require.main` instead.",
          "desc": "<p>The <code>process.mainModule</code> property provides an alternative way of retrieving\n<a href=\"modules.html#accessing-the-main-module\"><code>require.main</code></a>. The difference is that if the main module changes at\nruntime, <a href=\"modules.html#accessing-the-main-module\"><code>require.main</code></a> may still refer to the original main module in\nmodules that were required before the change occurred. Generally, it's\nsafe to assume that the two refer to the same module.</p>\n<p>As with <a href=\"modules.html#accessing-the-main-module\"><code>require.main</code></a>, <code>process.mainModule</code> will be <code>undefined</code> if there\nis no entry script.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "noDeprecation",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.8.0"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.noDeprecation</code> property indicates whether the <code>--no-deprecation</code>\nflag is set on the current Node.js process. See the documentation for\nthe <a href=\"#event-warning\"><code>'warning'</code> event</a> and the\n<a href=\"#processemitwarningwarning-type-code-ctor\"><code>emitWarning()</code> method</a> for more information about this\nflag's behavior.</p>"
        },
        {
          "textRaw": "Type: {Object}",
          "name": "permission",
          "type": "Object",
          "meta": {
            "added": [
              "v20.0.0"
            ],
            "changes": []
          },
          "desc": "<p>This API is available through the <a href=\"cli.html#--permission\"><code>--permission</code></a> or\n<a href=\"cli.html#--permission-audit\"><code>--permission-audit</code></a> flags.</p>\n<p><code>process.permission</code> is an object whose methods are used to manage permissions\nfor the current process. Additional documentation is available in the\n<a href=\"permissions.html#permission-model\">Permission Model</a>.</p>",
          "methods": [
            {
              "textRaw": "`process.permission.has(scope[, reference])`",
              "name": "has",
              "type": "method",
              "meta": {
                "added": [
                  "v20.0.0"
                ],
                "changes": []
              },
              "signatures": [
                {
                  "params": [
                    {
                      "textRaw": "`scope` {string}",
                      "name": "scope",
                      "type": "string"
                    },
                    {
                      "textRaw": "`reference` {string}",
                      "name": "reference",
                      "type": "string",
                      "optional": true
                    }
                  ],
                  "return": {
                    "textRaw": "Returns: {boolean}",
                    "name": "return",
                    "type": "boolean"
                  }
                }
              ],
              "desc": "<p>Verifies that the process is able to access the given scope and reference.\nIf no reference is provided, a global scope is assumed, for instance,\n<code>process.permission.has('fs.read')</code> will check if the process has ALL\nfile system read permissions.</p>\n<p>In audit mode (<a href=\"cli.html#--permission-audit\"><code>--permission-audit</code></a>), this method still returns the actual\npermission status, but denied operations will not throw <code>ERR_ACCESS_DENIED</code>.</p>\n<p>The reference has a meaning based on the provided scope. For example,\nthe reference when the scope is File System means files and folders.</p>\n<p>The available scopes are:</p>\n<ul>\n<li><code>fs</code> - All File System</li>\n<li><code>fs.read</code> - File System read operations</li>\n<li><code>fs.write</code> - File System write operations</li>\n<li><code>child</code> - Child process spawning operations</li>\n<li><code>openssl.store</code> - Loading keys through OpenSSL STORE loaders</li>\n<li><code>worker</code> - Worker thread spawning operation</li>\n<li><code>ffi</code> - Foreign function interface operations</li>\n</ul>\n<pre><code class=\"language-js\">// Check if the process has permission to read the README file\nprocess.permission.has('fs.read', './README.md');\n// Check if the process has read permission operations\nprocess.permission.has('fs.read');\n</code></pre>"
            },
            {
              "textRaw": "`process.permission.drop(scope[, reference])`",
              "name": "drop",
              "type": "method",
              "meta": {
                "added": [
                  "v26.3.0"
                ],
                "changes": []
              },
              "stability": 1.1,
              "stabilityText": "Active Development",
              "signatures": [
                {
                  "params": [
                    {
                      "textRaw": "`scope` {string}",
                      "name": "scope",
                      "type": "string"
                    },
                    {
                      "textRaw": "`reference` {string}",
                      "name": "reference",
                      "type": "string",
                      "optional": true
                    }
                  ]
                }
              ],
              "desc": "<p>Drops the specified permission from the current process. This operation is\n<strong>irreversible</strong> — once a permission is dropped, it cannot be restored through\nany Node.js API.</p>\n<p>In audit mode (<a href=\"cli.html#--permission-audit\"><code>--permission-audit</code></a>), dropping a permission takes effect,\nbut since denied operations do not throw, the impact is limited to changing the\nreturn value of <code>permission.has()</code>.</p>\n<p>If no reference is provided, the entire scope is dropped. For example,\n<code>process.permission.drop('fs.read')</code> will revoke ALL file system read\npermissions.</p>\n<p>When a reference is provided, only the permission for that specific resource\nis dropped. For example, <code>process.permission.drop('fs.read', '/etc/myapp')</code>\nwill revoke read access to that directory while keeping other read\npermissions intact.</p>\n<p><strong>Important:</strong> You can only drop the exact resource that was explicitly\ngranted. The reference passed to <code>drop()</code> must match the original grant:</p>\n<ul>\n<li>If a permission was granted using a wildcard (<code>*</code>), such as\n<code>--allow-fs-read=*</code>, individual paths cannot be dropped - only the entire\nscope can be dropped (by calling <code>drop()</code> without a reference).</li>\n<li>If a directory was granted (e.g. <code>--allow-fs-read=/my/folder</code>), you cannot\ndrop access to individual files inside it. You must drop the same directory\nthat was granted. Any remaining grants continue to apply.</li>\n</ul>\n<p>The available scopes are the same as <a href=\"#processpermissionhasscope-reference\"><code>process.permission.has()</code></a>:</p>\n<ul>\n<li><code>fs</code> - All File System (drops both read and write)</li>\n<li><code>fs.read</code> - File System read operations</li>\n<li><code>fs.write</code> - File System write operations</li>\n<li><code>child</code> - Child process spawning operations</li>\n<li><code>openssl.store</code> - Loading keys through OpenSSL STORE loaders</li>\n<li><code>worker</code> - Worker thread spawning operation</li>\n<li><code>net</code> - Network operations</li>\n<li><code>inspector</code> - Inspector operations</li>\n<li><code>wasi</code> - WASI operations</li>\n<li><code>addon</code> - Native addon operations</li>\n</ul>\n<pre><code class=\"language-js\">const fs = require('node:fs');\n\n// Read configuration during startup\nconst config = fs.readFileSync('/etc/myapp/config.json', 'utf8');\n\n// Drop read access to the config directory after initialization\nprocess.permission.drop('fs.read', '/etc/myapp');\n\n// This will now throw ERR_ACCESS_DENIED\nfs.readFileSync('/etc/myapp/config.json');\n</code></pre>"
            }
          ]
        },
        {
          "textRaw": "Type: {integer}",
          "name": "pid",
          "type": "integer",
          "meta": {
            "added": [
              "v0.1.15"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.pid</code> property returns the PID of the process.</p>\n<pre><code class=\"language-mjs\">import { pid } from 'node:process';\n\nconsole.log(`This process is pid ${pid}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { pid } = require('node:process');\n\nconsole.log(`This process is pid ${pid}`);\n</code></pre>"
        },
        {
          "textRaw": "Type: {string}",
          "name": "platform",
          "type": "string",
          "meta": {
            "added": [
              "v0.1.16"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.platform</code> property returns a string identifying the operating\nsystem platform for which the Node.js binary was compiled.</p>\n<p>Currently possible values are:</p>\n<ul>\n<li><code>'aix'</code></li>\n<li><code>'darwin'</code></li>\n<li><code>'freebsd'</code></li>\n<li><code>'linux'</code></li>\n<li><code>'openbsd'</code></li>\n<li><code>'sunos'</code></li>\n<li><code>'win32'</code></li>\n</ul>\n<pre><code class=\"language-mjs\">import { platform } from 'node:process';\n\nconsole.log(`This platform is ${platform}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { platform } = require('node:process');\n\nconsole.log(`This platform is ${platform}`);\n</code></pre>\n<p>The value <code>'android'</code> may also be returned if Node.js is built on the\nAndroid operating system. However, Android support in Node.js\n<a href=\"https://github.com/nodejs/node/blob/HEAD/BUILDING.md#android\">is experimental</a>.</p>"
        },
        {
          "textRaw": "Type: {integer}",
          "name": "ppid",
          "type": "integer",
          "meta": {
            "added": [
              "v9.2.0",
              "v8.10.0",
              "v6.13.0"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.ppid</code> property returns the PID of the parent of the\ncurrent process.</p>\n<pre><code class=\"language-mjs\">import { ppid } from 'node:process';\n\nconsole.log(`The parent process is pid ${ppid}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { ppid } = require('node:process');\n\nconsole.log(`The parent process is pid ${ppid}`);\n</code></pre>"
        },
        {
          "textRaw": "Type: {Object}",
          "name": "release",
          "type": "Object",
          "meta": {
            "added": [
              "v3.0.0"
            ],
            "changes": [
              {
                "version": "v4.2.0",
                "pr-url": "https://github.com/nodejs/node/pull/3212",
                "description": "The `lts` property is now supported."
              }
            ]
          },
          "desc": "<p>The <code>process.release</code> property returns an <code>Object</code> containing metadata related\nto the current release, including URLs for the source tarball and headers-only\ntarball.</p>\n<p><code>process.release</code> contains the following properties:</p>\n<ul>\n<li><code>name</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> A value that will always be <code>'node'</code>.</li>\n<li><code>sourceUrl</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> an absolute URL pointing to a <em><code>.tar.gz</code></em> file containing\nthe source code of the current release.</li>\n<li><code>headersUrl</code><a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> an absolute URL pointing to a <em><code>.tar.gz</code></em> file containing\nonly the source header files for the current release. This file is\nsignificantly smaller than the full source file and can be used for compiling\nNode.js native add-ons.</li>\n<li><code>libUrl</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> | <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#undefined_type\"><code>&#x3C;undefined></code></a> an absolute URL pointing to a <em><code>node.lib</code></em> file\nmatching the architecture and version of the current release. This file is\nused for compiling Node.js native add-ons. <em>This property is only present on\nWindows builds of Node.js and will be missing on all other platforms.</em></li>\n<li><code>lts</code> <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#string_type\"><code>&#x3C;string></code></a> | <a href=\"https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#undefined_type\"><code>&#x3C;undefined></code></a> a string label identifying the <a href=\"https://github.com/nodejs/Release\">LTS</a> label for this\nrelease. This property only exists for LTS releases and is <code>undefined</code> for all\nother release types, including <em>Current</em> releases. Valid values include the\nLTS Release code names (including those that are no longer supported).\n<ul>\n<li><code>'Fermium'</code> for the 14.x LTS line beginning with 14.15.0.</li>\n<li><code>'Gallium'</code> for the 16.x LTS line beginning with 16.13.0.</li>\n<li><code>'Hydrogen'</code> for the 18.x LTS line beginning with 18.12.0.\nFor other LTS Release code names, see <a href=\"https://github.com/nodejs/node/blob/HEAD/doc/changelogs/CHANGELOG_ARCHIVE.md\">Node.js Changelog Archive</a></li>\n</ul>\n</li>\n</ul>\n<pre><code class=\"language-json\">{\n  \"name\": \"node\",\n  \"lts\": \"Hydrogen\",\n  \"sourceUrl\": \"https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz\",\n  \"headersUrl\": \"https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz\",\n  \"libUrl\": \"https://nodejs.org/download/release/v18.12.0/win-x64/node.lib\"\n}\n</code></pre>\n<p>In custom builds from non-release versions of the source tree, only the\n<code>name</code> property may be present. The additional properties should not be\nrelied upon to exist.</p>"
        },
        {
          "textRaw": "Type: {Object}",
          "name": "report",
          "type": "Object",
          "meta": {
            "added": [
              "v11.8.0"
            ],
            "changes": [
              {
                "version": [
                  "v13.12.0",
                  "v12.17.0"
                ],
                "pr-url": "https://github.com/nodejs/node/pull/32242",
                "description": "This API is no longer experimental."
              }
            ]
          },
          "desc": "<p><code>process.report</code> is an object whose methods are used to generate diagnostic\nreports for the current process. Additional documentation is available in the\n<a href=\"report.html\">report documentation</a>.</p>",
          "properties": [
            {
              "textRaw": "Type: {boolean}",
              "name": "compact",
              "type": "boolean",
              "meta": {
                "added": [
                  "v13.12.0",
                  "v12.17.0"
                ],
                "changes": []
              },
              "desc": "<p>Write reports in a compact format, single-line JSON, more easily consumable\nby log processing systems than the default multi-line format designed for\nhuman consumption.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\n\nconsole.log(`Reports are compact? ${report.compact}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\n\nconsole.log(`Reports are compact? ${report.compact}`);\n</code></pre>"
            },
            {
              "textRaw": "Type: {string}",
              "name": "directory",
              "type": "string",
              "meta": {
                "added": [
                  "v11.12.0"
                ],
                "changes": [
                  {
                    "version": [
                      "v13.12.0",
                      "v12.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/32242",
                    "description": "This API is no longer experimental."
                  }
                ]
              },
              "desc": "<p>Directory where the report is written. The default value is the empty string,\nindicating that reports are written to the current working directory of the\nNode.js process.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\n\nconsole.log(`Report directory is ${report.directory}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\n\nconsole.log(`Report directory is ${report.directory}`);\n</code></pre>"
            },
            {
              "textRaw": "Type: {string}",
              "name": "filename",
              "type": "string",
              "meta": {
                "added": [
                  "v11.12.0"
                ],
                "changes": [
                  {
                    "version": [
                      "v13.12.0",
                      "v12.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/32242",
                    "description": "This API is no longer experimental."
                  }
                ]
              },
              "desc": "<p>Filename where the report is written. If set to the empty string, the output\nfilename will be comprised of a timestamp, PID, and sequence number. The default\nvalue is the empty string.</p>\n<p>If the value of <code>process.report.filename</code> is set to <code>'stdout'</code> or <code>'stderr'</code>,\nthe report is written to the stdout or stderr of the process respectively.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\n\nconsole.log(`Report filename is ${report.filename}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\n\nconsole.log(`Report filename is ${report.filename}`);\n</code></pre>"
            },
            {
              "textRaw": "Type: {boolean}",
              "name": "reportOnFatalError",
              "type": "boolean",
              "meta": {
                "added": [
                  "v11.12.0"
                ],
                "changes": [
                  {
                    "version": [
                      "v15.0.0",
                      "v14.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/35654",
                    "description": "This API is no longer experimental."
                  }
                ]
              },
              "desc": "<p>If <code>true</code>, a diagnostic report is generated on fatal errors, such as out of\nmemory errors or failed C++ assertions.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\n\nconsole.log(`Report on fatal error: ${report.reportOnFatalError}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\n\nconsole.log(`Report on fatal error: ${report.reportOnFatalError}`);\n</code></pre>"
            },
            {
              "textRaw": "Type: {boolean}",
              "name": "reportOnSignal",
              "type": "boolean",
              "meta": {
                "added": [
                  "v11.12.0"
                ],
                "changes": [
                  {
                    "version": [
                      "v13.12.0",
                      "v12.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/32242",
                    "description": "This API is no longer experimental."
                  }
                ]
              },
              "desc": "<p>If <code>true</code>, a diagnostic report is generated when the process receives the\nsignal specified by <code>process.report.signal</code>.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\n\nconsole.log(`Report on signal: ${report.reportOnSignal}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\n\nconsole.log(`Report on signal: ${report.reportOnSignal}`);\n</code></pre>"
            },
            {
              "textRaw": "Type: {boolean}",
              "name": "reportOnUncaughtException",
              "type": "boolean",
              "meta": {
                "added": [
                  "v11.12.0"
                ],
                "changes": [
                  {
                    "version": [
                      "v13.12.0",
                      "v12.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/32242",
                    "description": "This API is no longer experimental."
                  }
                ]
              },
              "desc": "<p>If <code>true</code>, a diagnostic report is generated on uncaught exception.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\n\nconsole.log(`Report on exception: ${report.reportOnUncaughtException}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\n\nconsole.log(`Report on exception: ${report.reportOnUncaughtException}`);\n</code></pre>"
            },
            {
              "textRaw": "Type: {boolean}",
              "name": "excludeEnv",
              "type": "boolean",
              "meta": {
                "added": [
                  "v23.3.0",
                  "v22.13.0"
                ],
                "changes": []
              },
              "desc": "<p>If <code>true</code>, a diagnostic report is generated without the environment variables.</p>"
            },
            {
              "textRaw": "Type: {string}",
              "name": "signal",
              "type": "string",
              "meta": {
                "added": [
                  "v11.12.0"
                ],
                "changes": [
                  {
                    "version": [
                      "v13.12.0",
                      "v12.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/32242",
                    "description": "This API is no longer experimental."
                  }
                ]
              },
              "desc": "<p>The signal used to trigger the creation of a diagnostic report. Defaults to\n<code>'SIGUSR2'</code>.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\n\nconsole.log(`Report signal: ${report.signal}`);\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\n\nconsole.log(`Report signal: ${report.signal}`);\n</code></pre>"
            }
          ],
          "methods": [
            {
              "textRaw": "`process.report.getReport([err])`",
              "name": "getReport",
              "type": "method",
              "meta": {
                "added": [
                  "v11.8.0"
                ],
                "changes": [
                  {
                    "version": [
                      "v13.12.0",
                      "v12.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/32242",
                    "description": "This API is no longer experimental."
                  }
                ]
              },
              "signatures": [
                {
                  "params": [
                    {
                      "textRaw": "`err` {Error} A custom error used for reporting the JavaScript stack.",
                      "name": "err",
                      "type": "Error",
                      "desc": "A custom error used for reporting the JavaScript stack.",
                      "optional": true
                    }
                  ],
                  "return": {
                    "textRaw": "Returns: {Object}",
                    "name": "return",
                    "type": "Object"
                  }
                }
              ],
              "desc": "<p>Returns a JavaScript Object representation of a diagnostic report for the\nrunning process. The report's JavaScript stack trace is taken from <code>err</code>, if\npresent.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\nimport util from 'node:util';\n\nconst data = report.getReport();\nconsole.log(data.header.nodejsVersion);\n\n// Similar to process.report.writeReport()\nimport fs from 'node:fs';\nfs.writeFileSync('my-report.log', util.inspect(data), 'utf8');\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\nconst util = require('node:util');\n\nconst data = report.getReport();\nconsole.log(data.header.nodejsVersion);\n\n// Similar to process.report.writeReport()\nconst fs = require('node:fs');\nfs.writeFileSync('my-report.log', util.inspect(data), 'utf8');\n</code></pre>\n<p>Additional documentation is available in the <a href=\"report.html\">report documentation</a>.</p>"
            },
            {
              "textRaw": "`process.report.writeReport([filename][, err])`",
              "name": "writeReport",
              "type": "method",
              "meta": {
                "added": [
                  "v11.8.0"
                ],
                "changes": [
                  {
                    "version": [
                      "v13.12.0",
                      "v12.17.0"
                    ],
                    "pr-url": "https://github.com/nodejs/node/pull/32242",
                    "description": "This API is no longer experimental."
                  }
                ]
              },
              "signatures": [
                {
                  "params": [
                    {
                      "textRaw": "`filename` {string} Name of the file where the report is written. This should be a relative path, that will be appended to the directory specified in `process.report.directory`, or the current working directory of the Node.js process, if unspecified.",
                      "name": "filename",
                      "type": "string",
                      "desc": "Name of the file where the report is written. This should be a relative path, that will be appended to the directory specified in `process.report.directory`, or the current working directory of the Node.js process, if unspecified.",
                      "optional": true
                    },
                    {
                      "textRaw": "`err` {Error} A custom error used for reporting the JavaScript stack.",
                      "name": "err",
                      "type": "Error",
                      "desc": "A custom error used for reporting the JavaScript stack.",
                      "optional": true
                    }
                  ],
                  "return": {
                    "textRaw": "Returns: {string} Returns the filename of the generated report.",
                    "name": "return",
                    "type": "string",
                    "desc": "Returns the filename of the generated report."
                  }
                }
              ],
              "desc": "<p>Writes a diagnostic report to a file. If <code>filename</code> is not provided, the default\nfilename includes the date, time, PID, and a sequence number. The report's\nJavaScript stack trace is taken from <code>err</code>, if present.</p>\n<p>If the value of <code>filename</code> is set to <code>'stdout'</code> or <code>'stderr'</code>, the report is\nwritten to the stdout or stderr of the process respectively.</p>\n<pre><code class=\"language-mjs\">import { report } from 'node:process';\n\nreport.writeReport();\n</code></pre>\n<pre><code class=\"language-cjs\">const { report } = require('node:process');\n\nreport.writeReport();\n</code></pre>\n<p>Additional documentation is available in the <a href=\"report.html\">report documentation</a>.</p>"
            }
          ]
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "sourceMapsEnabled",
          "type": "boolean",
          "meta": {
            "added": [
              "v20.7.0",
              "v18.19.0"
            ],
            "changes": []
          },
          "stability": 1,
          "stabilityText": "Experimental: Use `module.getSourceMapsSupport()` instead.",
          "desc": "<p>The <code>process.sourceMapsEnabled</code> property returns whether the\n<a href=\"https://tc39.es/ecma426/\">Source Map</a> support for stack traces is enabled.</p>"
        },
        {
          "textRaw": "Type: {Stream}",
          "name": "stderr",
          "type": "Stream",
          "desc": "<p>The <code>process.stderr</code> property returns a stream connected to\n<code>stderr</code> (fd <code>2</code>). It is a <a href=\"net.html#class-netsocket\"><code>net.Socket</code></a> (which is a <a href=\"stream.html#duplex-and-transform-streams\">Duplex</a>\nstream) unless fd <code>2</code> refers to a file, in which case it is\na <a href=\"stream.html#writable-streams\">Writable</a> stream.</p>\n<p><code>process.stderr</code> differs from other Node.js streams in important ways. See\n<a href=\"#a-note-on-process-io\">note on process I/O</a> for more information.</p>",
          "properties": [
            {
              "textRaw": "Type: {number}",
              "name": "fd",
              "type": "number",
              "desc": "<p>This property refers to the value of underlying file descriptor of\n<code>process.stderr</code>. The value is fixed at <code>2</code>. In <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads,\nthis field does not exist.</p>"
            }
          ]
        },
        {
          "textRaw": "Type: {Stream}",
          "name": "stdin",
          "type": "Stream",
          "desc": "<p>The <code>process.stdin</code> property returns a stream connected to\n<code>stdin</code> (fd <code>0</code>). It is a <a href=\"net.html#class-netsocket\"><code>net.Socket</code></a> (which is a <a href=\"stream.html#duplex-and-transform-streams\">Duplex</a>\nstream) unless fd <code>0</code> refers to a file, in which case it is\na <a href=\"stream.html#readable-streams\">Readable</a> stream.</p>\n<p>For details of how to read from <code>stdin</code> see <a href=\"stream.html#readablereadsize\"><code>readable.read()</code></a>.</p>\n<p>As a <a href=\"stream.html#duplex-and-transform-streams\">Duplex</a> stream, <code>process.stdin</code> can also be used in \"old\" mode that\nis compatible with scripts written for Node.js prior to v0.10.\nFor more information see <a href=\"stream.html#compatibility-with-older-nodejs-versions\">Stream compatibility</a>.</p>\n<p>In \"old\" streams mode the <code>stdin</code> stream is paused by default, so one\nmust call <code>process.stdin.resume()</code> to read from it. Note also that calling\n<code>process.stdin.resume()</code> itself would switch stream to \"old\" mode.</p>",
          "properties": [
            {
              "textRaw": "Type: {number}",
              "name": "fd",
              "type": "number",
              "desc": "<p>This property refers to the value of underlying file descriptor of\n<code>process.stdin</code>. The value is fixed at <code>0</code>. In <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads,\nthis field does not exist.</p>"
            }
          ]
        },
        {
          "textRaw": "Type: {Stream}",
          "name": "stdout",
          "type": "Stream",
          "desc": "<p>The <code>process.stdout</code> property returns a stream connected to\n<code>stdout</code> (fd <code>1</code>). It is a <a href=\"net.html#class-netsocket\"><code>net.Socket</code></a> (which is a <a href=\"stream.html#duplex-and-transform-streams\">Duplex</a>\nstream) unless fd <code>1</code> refers to a file, in which case it is\na <a href=\"stream.html#writable-streams\">Writable</a> stream.</p>\n<p>For example, to copy <code>process.stdin</code> to <code>process.stdout</code>:</p>\n<pre><code class=\"language-mjs\">import { stdin, stdout } from 'node:process';\n\nstdin.pipe(stdout);\n</code></pre>\n<pre><code class=\"language-cjs\">const { stdin, stdout } = require('node:process');\n\nstdin.pipe(stdout);\n</code></pre>\n<p><code>process.stdout</code> differs from other Node.js streams in important ways. See\n<a href=\"#a-note-on-process-io\">note on process I/O</a> for more information.</p>",
          "properties": [
            {
              "textRaw": "Type: {number}",
              "name": "fd",
              "type": "number",
              "desc": "<p>This property refers to the value of underlying file descriptor of\n<code>process.stdout</code>. The value is fixed at <code>1</code>. In <a href=\"worker_threads.html#class-worker\"><code>Worker</code></a> threads,\nthis field does not exist.</p>"
            }
          ],
          "modules": [
            {
              "textRaw": "A note on process I/O",
              "name": "a_note_on_process_i/o",
              "type": "module",
              "desc": "<p><code>process.stdout</code> and <code>process.stderr</code> differ from other Node.js streams in\nimportant ways:</p>\n<ol>\n<li>They are used internally by <a href=\"console.html#consolelogdata-args\"><code>console.log()</code></a> and <a href=\"console.html#consoleerrordata-args\"><code>console.error()</code></a>,\nrespectively.</li>\n<li>Writes may be synchronous depending on what the stream is connected to\nand whether the system is Windows or POSIX:\n<ul>\n<li>Files: <em>synchronous</em> on Windows and POSIX</li>\n<li>TTYs (Terminals): <em>asynchronous</em> on Windows, <em>synchronous</em> on POSIX</li>\n<li>Pipes (and sockets): <em>synchronous</em> on Windows, <em>asynchronous</em> on POSIX</li>\n</ul>\n</li>\n</ol>\n<p>These behaviors are partly for historical reasons, as changing them would\ncreate backward incompatibility, but they are also expected by some users.</p>\n<p>Synchronous writes avoid problems such as output written with <code>console.log()</code> or\n<code>console.error()</code> being unexpectedly interleaved, or not written at all if\n<code>process.exit()</code> is called before an asynchronous write completes. See\n<a href=\"#processexitcode\"><code>process.exit()</code></a> for more information.</p>\n<p><em><strong>Warning</strong></em>: Synchronous writes block the event loop until the write has\ncompleted. This can be near instantaneous in the case of output to a file, but\nunder high system load, pipes that are not being read at the receiving end, or\nwith slow terminals or file systems, it's possible for the event loop to be\nblocked often enough and long enough to have severe negative performance\nimpacts. This may not be a problem when writing to an interactive terminal\nsession, but consider this particularly careful when doing production logging to\nthe process output streams.</p>\n<p>To check if a stream is connected to a <a href=\"tty.html#tty\">TTY</a> context, check the <code>isTTY</code>\nproperty.</p>\n<p>For instance:</p>\n<pre><code class=\"language-console\">$ node -p \"Boolean(process.stdin.isTTY)\"\ntrue\n$ echo \"foo\" | node -p \"Boolean(process.stdin.isTTY)\"\nfalse\n$ node -p \"Boolean(process.stdout.isTTY)\"\ntrue\n$ node -p \"Boolean(process.stdout.isTTY)\" | cat\nfalse\n</code></pre>\n<p>See the <a href=\"tty.html#tty\">TTY</a> documentation for more information.</p>",
              "displayName": "A note on process I/O"
            }
          ]
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "throwDeprecation",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.9.12"
            ],
            "changes": []
          },
          "desc": "<p>The initial value of <code>process.throwDeprecation</code> indicates whether the\n<code>--throw-deprecation</code> flag is set on the current Node.js process.\n<code>process.throwDeprecation</code> is mutable, so whether or not deprecation\nwarnings result in errors may be altered at runtime. See the\ndocumentation for the <a href=\"#event-warning\"><code>'warning'</code> event</a> and the\n<a href=\"#processemitwarningwarning-type-code-ctor\"><code>emitWarning()</code> method</a> for more information.</p>\n<pre><code class=\"language-console\">$ node --throw-deprecation -p \"process.throwDeprecation\"\ntrue\n$ node -p \"process.throwDeprecation\"\nundefined\n$ node\n> process.emitWarning('test', 'DeprecationWarning');\nundefined\n> (node:26598) DeprecationWarning: test\n> process.throwDeprecation = true;\ntrue\n> process.emitWarning('test', 'DeprecationWarning');\nThrown:\n[DeprecationWarning: test] { name: 'DeprecationWarning' }\n</code></pre>"
        },
        {
          "textRaw": "Type: {string}",
          "name": "title",
          "type": "string",
          "meta": {
            "added": [
              "v0.1.104"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.title</code> property returns the current process title (i.e. returns\nthe current value of <code>ps</code>). Assigning a new value to <code>process.title</code> modifies\nthe current value of <code>ps</code>.</p>\n<p>When a new value is assigned, different platforms will impose different maximum\nlength restrictions on the title. Usually such restrictions are quite limited.\nFor instance, on Linux and macOS, <code>process.title</code> is limited to the size of the\nbinary name plus the length of the command-line arguments because setting the\n<code>process.title</code> overwrites the <code>argv</code> memory of the process. Node.js 0.8\nallowed for longer process title strings by also overwriting the <code>environ</code>\nmemory but that was potentially insecure and confusing in some (rather obscure)\ncases.</p>\n<p>Assigning a value to <code>process.title</code> might not result in an accurate label\nwithin process manager applications such as macOS Activity Monitor or Windows\nServices Manager.</p>"
        },
        {
          "textRaw": "Type: {boolean}",
          "name": "traceDeprecation",
          "type": "boolean",
          "meta": {
            "added": [
              "v0.8.0"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.traceDeprecation</code> property indicates whether the\n<code>--trace-deprecation</code> flag is set on the current Node.js process. See the\ndocumentation for the <a href=\"#event-warning\"><code>'warning'</code> event</a> and the\n<a href=\"#processemitwarningwarning-type-code-ctor\"><code>emitWarning()</code> method</a> for more information about this\nflag's behavior.</p>"
        },
        {
          "textRaw": "{boolean}",
          "name": "traceProcessWarnings",
          "type": "boolean",
          "meta": {
            "added": [
              "v6.10.0"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.traceProcessWarnings</code> property indicates whether the <code>--trace-warnings</code> flag\nis set on the current Node.js process. This property allows programmatic control over the\ntracing of warnings, enabling or disabling stack traces for warnings at runtime.</p>\n<pre><code class=\"language-js\">// Enable trace warnings\nprocess.traceProcessWarnings = true;\n\n// Emit a warning with a stack trace\nprocess.emitWarning('Warning with stack trace');\n\n// Disable trace warnings\nprocess.traceProcessWarnings = false;\n</code></pre>"
        },
        {
          "textRaw": "Type: {string}",
          "name": "version",
          "type": "string",
          "meta": {
            "added": [
              "v0.1.3"
            ],
            "changes": []
          },
          "desc": "<p>The <code>process.version</code> property contains the Node.js version string.</p>\n<pre><code class=\"language-mjs\">import { version } from 'node:process';\n\nconsole.log(`Version: ${version}`);\n// Version: v14.8.0\n</code></pre>\n<pre><code class=\"language-cjs\">const { version } = require('node:process');\n\nconsole.log(`Version: ${version}`);\n// Version: v14.8.0\n</code></pre>\n<p>To get the version string without the prepended <em>v</em>, use\n<code>process.versions.node</code>.</p>"
        },
        {
          "textRaw": "Type: {Object}",
          "name": "versions",
          "type": "Object",
          "meta": {
            "added": [
              "v0.2.0"
            ],
            "changes": [
              {
                "version": "v9.0.0",
                "pr-url": "https://github.com/nodejs/node/pull/15785",
                "description": "The `v8` property now includes a Node.js specific suffix."
              },
              {
                "version": "v4.2.0",
                "pr-url": "https://github.com/nodejs/node/pull/3102",
                "description": "The `icu` property is now supported."
              }
            ]
          },
          "desc": "<p>The <code>process.versions</code> property returns an object listing the version strings of\nNode.js and its dependencies. <code>process.versions.modules</code> indicates the current\nABI version, which is increased whenever a C++ API changes. Node.js will refuse\nto load modules that were compiled against a different module ABI version.</p>\n<pre><code class=\"language-mjs\">import { versions } from 'node:process';\n\nconsole.log(versions);\n</code></pre>\n<pre><code class=\"language-cjs\">const { versions } = require('node:process');\n\nconsole.log(versions);\n</code></pre>\n<p>Will generate an object similar to:</p>\n<pre><code class=\"language-console\">{ node: '26.0.0-pre',\n  acorn: '8.15.0',\n  ada: '3.4.1',\n  amaro: '1.1.5',\n  ares: '1.34.6',\n  brotli: '1.2.0',\n  merve: '1.0.0',\n  cldr: '48.0',\n  icu: '78.2',\n  llhttp: '9.3.0',\n  modules: '144',\n  napi: '10',\n  nbytes: '0.1.1',\n  ncrypto: '0.0.1',\n  nghttp2: '1.68.0',\n  nghttp3: '',\n  ngtcp2: '',\n  openssl: '3.5.4',\n  simdjson: '4.2.4',\n  simdutf: '7.3.3',\n  sqlite: '3.51.2',\n  tz: '2025c',\n  undici: '7.18.2',\n  unicode: '17.0',\n  uv: '1.51.0',\n  uvwasi: '0.0.23',\n  v8: '14.3.127.18-node.10',\n  zlib: '1.3.1-e00f703',\n  zstd: '1.5.7' }\n</code></pre>"
        }
      ]
    }
  ]
}