@dogmalang/exec.async
v0.1.2
Published
Functions for executing lines from shell, asynchronously.
Downloads
23
Readme
@dogmalang/exec.async
Functions for executing lines from shell, asynchronously.
Engineered in Valencia, Spain, EU by Justo Labs.
Use
const {exec, execf, pexec} = require("@dogmalang/exec.async");exec()
It executes a command:
async function exec(...cmd) : object
async function exec(...cmd, opts:object) : objectcmd, the command to run.opts, the options:workDir(string), the work directory to use.env(object), the environment variables to use.detach(bool or number), detach the execution? When a number, this is the milliseconds to wait before returning and detecting an error during this interval.enc(string), the output encoding.
execf()
Similar to exec(), but for a command with format:
async function execf(fmt:string, ...args) : object
async function execf(fmt:string, ...args, opts:object) : object