Skip to content
Permalink
Browse files

process: hide NodeEnvironmentFlagsSet's `add` function

This makes sure that the `add` function is not visible by default
when inspecting `process.allowedNodeEnvironmentFlags`.

PR-URL: #28206
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information...
BridgeAR authored and targos committed Jun 13, 2019
1 parent 993c0db commit e517b03701732538c129fab76562b557fd46ccaf
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/internal/process/per_thread.js
@@ -263,7 +263,9 @@ function buildAllowedFlags() {

// The super constructor consumes `add`, but
// disallow any future adds.
this.add = () => this;
Object.defineProperty(this, 'add', {
value: () => this
});
}

delete() {

0 comments on commit e517b03

Please sign in to comment.
You can’t perform that action at this time.