File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22const {
3+ ArrayPrototypeForEach,
34 ArrayPrototypeMap,
45 ArrayPrototypePush,
56 FunctionPrototypeBind,
@@ -62,18 +63,22 @@ class WASI {
6263 const env = [ ] ;
6364 if ( options . env !== undefined ) {
6465 validateObject ( options . env , 'options.env' ) ;
65- for ( const [ key , value ] of ObjectEntries ( options . env ) ) {
66- if ( value !== undefined )
67- ArrayPrototypePush ( env , `${ key } =${ value } ` ) ;
68- }
66+ ArrayPrototypeForEach (
67+ ObjectEntries ( options . env ) ,
68+ ( { 0 : key , 1 : value } ) => {
69+ if ( value !== undefined )
70+ ArrayPrototypePush ( env , `${ key } =${ value } ` ) ;
71+ } ) ;
6972 }
7073
7174 const preopens = [ ] ;
7275 if ( options . preopens !== undefined ) {
7376 validateObject ( options . preopens , 'options.preopens' ) ;
74- for ( const [ key , value ] of ObjectEntries ( options . preopens ) ) {
75- ArrayPrototypePush ( preopens , String ( key ) , String ( value ) ) ;
76- }
77+ ArrayPrototypeForEach (
78+ ObjectEntries ( options . preopens ) ,
79+ ( { 0 : key , 1 : value } ) =>
80+ ArrayPrototypePush ( preopens , String ( key ) , String ( value ) )
81+ ) ;
7782 }
7883
7984 const { stdin = 0 , stdout = 1 , stderr = 2 } = options ;
You can’t perform that action at this time.
0 commit comments