Skip to content

Commit

Permalink
Improve readme example (#141)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
anubhavsrivastava and sindresorhus committed Jun 26, 2019
1 parent 023602a commit 11b0426
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions readme.md
Expand Up @@ -28,15 +28,15 @@ $ npm install open
```js
const open = require('open');

// Opens the image in the default image viewer
(async () => {
await open('unicorn.png', {wait: true});
console.log('The image viewer app closed');
// Opens the image in the default image viewer and waits for the opened app to quit
await open('unicorn.png', {wait: true});
console.log('The image viewer app quit');

// Opens the url in the default browser
// Opens the URL in the default browser
await open('https://sindresorhus.com');

// Specify the app to open in
// Opens the URL in a specified browser
await open('https://sindresorhus.com', {app: 'firefox'});

// Specify app arguments
Expand Down

0 comments on commit 11b0426

Please sign in to comment.