constopen=require('open');// Opens the image in the default image viewer and waits for the opened app to quit.
awaitopen('unicorn.png',{wait:true});console.log('The image viewer app quit');// Opens the URL in the default browser.
awaitopen('https://sindresorhus.com');// Opens the URL in a specified browser.
awaitopen('https://sindresorhus.com',{app:{name:'firefox'}});// Specify app arguments.
awaitopen('https://sindresorhus.com',{app:{name:'google chrome',arguments:['--incognito']}});// Open an app
awaitopen.openApp('xcode');// Open an app with arguments
awaitopen.openApp(open.apps.chrome,{arguments:['--incognito']});