@dogmalang/exec.async

0.1.2 • Public • Published

@dogmalang/exec.async

NPM version Total downloads

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) : object
  • cmd, 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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    7
  • 0.1.1
    2
  • 0.1.0
    1

Package Sidebar

Install

npm i @dogmalang/exec.async

Weekly Downloads

3

Version

0.1.2

License

none

Unpacked Size

4.76 kB

Total Files

3

Last publish

Collaborators

  • dogmalang