Skip to content

Commit 1e7dad2

Browse files
authored
docs: add imports to usage (#22)
1 parent ea20f57 commit 1e7dad2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ $ npm i -S tinyexec
1616
A process can be spawned and awaited like so:
1717

1818
```ts
19+
import {x} from 'tinyexec';
20+
1921
const result = await x('ls', ['-l']);
2022

2123
// result.stdout - the stdout as a string
@@ -25,6 +27,8 @@ const result = await x('ls', ['-l']);
2527
You may also iterate over the lines of output via an async loop:
2628

2729
```ts
30+
import {x} from 'tinyexec';
31+
2832
const result = x('ls', ['-l']);
2933

3034
for await (const line of result) {

0 commit comments

Comments
 (0)