Add README
parent
6f8d8aee07
commit
e5b5ea0621
@ -0,0 +1,17 @@
|
|||||||
|
# An async wrapper for nodejs' `spawn`
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import spawn from "async-spawner";
|
||||||
|
await simpleSpawn("ls", "-al");
|
||||||
|
```
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { deferedSpawn } from "async-spawner";
|
||||||
|
const ping = await deferedSpawn("ping", ["8.8.8.8"]);
|
||||||
|
let response;
|
||||||
|
do{
|
||||||
|
response = await ping.waitForNextData();
|
||||||
|
console.log("new ping!", response);
|
||||||
|
}
|
||||||
|
ping.kill();
|
||||||
|
```
|
Loading…
Reference in New Issue