File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -17,33 +17,23 @@ let embedderOptions;
17
17
// complete so that we don't accidentally include runtime-dependent
18
18
// states into a runtime-independent snapshot.
19
19
function getCLIOptionsFromBinding ( ) {
20
- if ( ! optionsDict ) {
21
- optionsDict = getCLIOptionsValues ( ) ;
22
- }
23
- return optionsDict ;
20
+ return optionsDict ??= getCLIOptionsValues ( ) ;
24
21
}
25
22
26
23
function getCLIOptionsInfoFromBinding ( ) {
27
- if ( ! cliInfo ) {
28
- cliInfo = getCLIOptionsInfo ( ) ;
29
- }
30
- return cliInfo ;
24
+ return cliInfo ??= getCLIOptionsInfo ( ) ;
31
25
}
32
26
33
27
function getEmbedderOptions ( ) {
34
- if ( ! embedderOptions ) {
35
- embedderOptions = getEmbedderOptionsFromBinding ( ) ;
36
- }
37
- return embedderOptions ;
28
+ return embedderOptions ??= getEmbedderOptionsFromBinding ( ) ;
38
29
}
39
30
40
31
function refreshOptions ( ) {
41
32
optionsDict = undefined ;
42
33
}
43
34
44
35
function getOptionValue ( optionName ) {
45
- const optionsDict = getCLIOptionsFromBinding ( ) ;
46
- return optionsDict [ optionName ] ;
36
+ return getCLIOptionsFromBinding ( ) [ optionName ] ;
47
37
}
48
38
49
39
function getAllowUnauthorized ( ) {
You can’t perform that action at this time.
0 commit comments