From e5b5ea0621249c35af944f0c4e7585322bb888aa Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Sat, 2 Jan 2021 16:35:54 +0100 Subject: [PATCH] Add README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..16d23c6 --- /dev/null +++ b/README.md @@ -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(); +```