Commit bdaac04 1 parent f7833ac commit bdaac04 Copy full SHA for bdaac04
File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 2
2
/* global WebAssembly */
3
3
const {
4
4
ArrayIsArray,
5
- ArrayPrototypeForEach,
6
5
ArrayPrototypeMap,
6
+ ArrayPrototypePush,
7
7
FunctionPrototypeBind,
8
- ObjectKeys ,
8
+ ObjectEntries ,
9
9
Symbol,
10
10
} = primordials ;
11
11
@@ -40,7 +40,7 @@ class WASI {
40
40
for ( const key in env ) {
41
41
const value = env [ key ] ;
42
42
if ( value !== undefined )
43
- envPairs . push ( `${ key } =${ value } ` ) ;
43
+ ArrayPrototypePush ( envPairs , `${ key } =${ value } ` ) ;
44
44
}
45
45
} else if ( env !== undefined ) {
46
46
throw new ERR_INVALID_ARG_TYPE ( 'options.env' , 'Object' , env ) ;
@@ -49,10 +49,9 @@ class WASI {
49
49
const preopenArray = [ ] ;
50
50
51
51
if ( typeof preopens === 'object' && preopens !== null ) {
52
- ArrayPrototypeForEach ( ObjectKeys ( preopens ) , ( key ) => {
53
- preopenArray . push ( String ( key ) ) ;
54
- preopenArray . push ( String ( preopens [ key ] ) ) ;
55
- } ) ;
52
+ for ( const [ key , value ] of ObjectEntries ( preopens ) ) {
53
+ ArrayPrototypePush ( preopenArray , String ( key ) , String ( value ) ) ;
54
+ }
56
55
} else if ( preopens !== undefined ) {
57
56
throw new ERR_INVALID_ARG_TYPE ( 'options.preopens' , 'Object' , preopens ) ;
58
57
}
You can’t perform that action at this time.
0 commit comments