mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
process: hide NodeEnvironmentFlagsSet's add
function
This makes sure that the `add` function is not visible by default when inspecting `process.allowedNodeEnvironmentFlags`. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
380494f022
commit
14be3aa6e6
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user