A simple TypeScript/Node.js utility to spawn processes and get their output with async/await
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Kuba Orlik 77ff039406 Fix spawn not resolving 3 years ago
src Fix spawn not resolving 3 years ago
.gitignore Initial commit 4 years ago
.npmignore Rename 4 years ago
README.md add .write method 3 years ago
package-lock.json 0.1.5 4 years ago
package.json Include stderr in simplespawner output 3 years ago
tsconfig.json es6 4 years ago


An async wrapper for nodejs' spawn

import simpleSpawn from "async-spawner";
await simpleSpawn("ls", ["-al"]);
import { deferedSpawn } from "async-spawner";
const ping = await deferedSpawn("ping", [""]);
let response;
    response = await ping.waitForNextData();
    console.log("new ping!", response);

    // you can also write to stdin with ping.write("some string")