Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
process: hide NodeEnvironmentFlagsSet's add function
This makes sure that the `add` function is not visible by default
when inspecting `process.allowedNodeEnvironmentFlags`.
  • Loading branch information
BridgeAR committed Jun 13, 2019
commit d87b64767ce6c0f362f164090fb86a8759f60025
4 changes: 3 additions & 1 deletion lib/internal/process/per_thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down