Skip to main content
Process.allowedNodeEnvironmentFlags - node__process.d.ts - Node documentation
property Process.allowedNodeEnvironmentFlags

Usage in Deno

```typescript import { type Process } from "node:node__process.d.ts"; ```
The `process.allowedNodeEnvironmentFlags` property is a special, read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable. `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag representations. `process.allowedNodeEnvironmentFlags.has()` will return `true` in the following cases: * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`. * Flags passed through to V8 (as listed in `--v8-options`) may replace one or more _non-leading_ dashes for an underscore, or vice-versa; e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`, etc. * Flags may contain one or more equals (`=`) characters; all characters after and including the first equals will be ignored; e.g., `--stack-trace-limit=100`. * Flags _must_ be allowable within `NODE_OPTIONS`. When iterating over `process.allowedNodeEnvironmentFlags`, flags will appear only _once_; each will begin with one or more dashes. Flags passed through to V8 will contain underscores instead of non-leading dashes: ```js import { allowedNodeEnvironmentFlags } from 'node:process'; allowedNodeEnvironmentFlags.forEach((flag) => { // -r // --inspect-brk // --abort_on_uncaught_exception // ... }); ``` The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail silently. If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in config), `process.allowedNodeEnvironmentFlags` will contain what _would have_ been allowable.

Type

ReadonlySet<string>