Skip to content

Commit

Permalink
docs: add parallel example (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jan 15, 2023
1 parent c4be140 commit 77c2e70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ await $`echo 5`; // outputs: 5

// more complex example outputting 1 to stdout and 2 to stderr
await $`echo 1 && deno eval 'console.error(2);'`;

// parallel
await Promise.all([
$`sleep 1 ; echo 1`,
$`sleep 2 ; echo 2`,
$`sleep 3 ; echo 3`,
]);
```

### Getting output
Expand Down
2 changes: 1 addition & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export async function safeLstat(path: string) {
}
}

/** lstate that doesn't throw when the path is not found. */
/** lstat that doesn't throw when the path is not found. */
export function safeLstatSync(path: string) {
try {
return Deno.lstatSync(path);
Expand Down

0 comments on commit 77c2e70

Please sign in to comment.