@@ -807,7 +807,7 @@ return `true` in the following cases:
807807* Flags may omit leading single (` - ` ) or double (` -- ` ) dashes; e.g.,
808808 ` inspect-brk ` for ` --inspect-brk ` , or ` r ` for ` -r ` .
809809* Flags passed through to V8 (as listed in ` --v8-options ` ) may replace
810- one or more _ non-leading_ dashes for an underscore, or vice- versa;
810+ one or more _ non-leading_ dashes for an underscore, or vice versa;
811811 e.g., ` --perf_basic_prof ` , ` --perf-basic-prof ` , ` --perf_basic-prof ` ,
812812 etc.
813813* Flags may contain one or more equals (` = ` ) characters; all
@@ -944,6 +944,61 @@ $ bash -c 'exec -a customArgv0 ./node'
944944'customArgv0'
945945```
946946
947+ ## ` process.availableV8Flags `
948+
949+ <!-- YAML
950+ added: REPLACEME
951+ -->
952+
953+ > Stability: 1 - Experimental
954+
955+ * {Set}
956+
957+ The ` process.availableV8Flags ` property is a special, read-only ` Set ` of
958+ command-line flags. If a user supplies one or more of these flags, Node.js will
959+ pass the flags through to V8. These flags are not supported by Node.js. Avoid
960+ using these flags if at all possible. They may or may not work correctly, and
961+ their behavior can change in breaking ways in any Node.js release.
962+
963+ ` process.availableV8Flags ` extends ` Set ` , but overrides ` Set.prototype.has ` to
964+ recognize several different possible flag representations.
965+ ` process.availableV8Flags.has() ` will return ` true ` in the following cases:
966+
967+ * Flags may omit leading single (` - ` ) or double (` -- ` ) dashes.
968+ * Flags may replace one or more non-leading dashes for an underscore, or vice
969+ versa.
970+ * Flags may contain one or more equals (` = ` ) characters and all
971+ characters after and including the first equals will be ignored.
972+
973+ When iterating over ` process.availableV8Flags ` , flags will appear only once.
974+ Each will begin with one or more dashes. Flags will contain underscores instead
975+ of non-leading dashes.
976+
977+ ``` mjs
978+ import { availableV8Flags } from ' process' ;
979+
980+ availableV8Flags .forEach ((flag ) => {
981+ // --abort-on-contradictory-flags
982+ // --abort-on-uncaught-exception
983+ // --adjust-os-scheduling-parameters
984+ // ...
985+ });
986+ ```
987+
988+ ``` cjs
989+ const { availableV8Flags } = require (' process' );
990+
991+ availableV8Flags .forEach ((flag ) => {
992+ // --abort-on-contradictory-flags
993+ // --abort-on-uncaught-exception
994+ // --adjust-os-scheduling-parameters
995+ // ...
996+ });
997+ ```
998+
999+ The methods ` add() ` , ` clear() ` , and ` delete() ` of ` process.availableV8Flags ` do
1000+ nothing.
1001+
9471002## ` process.channel `
9481003
9491004<!-- YAML
0 commit comments