New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@dogmalang/exec

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dogmalang/exec

Functions for executing lines from shell.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@dogmalang/exec

NPM version Total downloads

Functions for executing lines from shell.

Engineered in Valencia, Spain, EU by Justo Labs.

Use

const {exec, execf, pexec} = require("@dogmalang/exec");

exec()

It executes a command:

function exec(...cmd) : object
function exec(...cmd, opts:object) : object
function exec(...cmd, callback:function) : object
  • cmd, the command to run.
  • callback, the function to call when the run ended.
  • opts, the options:
    • workDir (string), the work directory to use.
    • env (object), the environment variables to use.
    • detach (bool), detach the execution? When callback, this option is always true.
    • enc (string), the output encoding.
    • async (bool), asynchronously? If true, the function returns a promise. Default: false.

execf()

Similar to exec(), but for a command with format:

function execf(fmt:string, ...args) : object
function execf(fmt:string, ...args, opts:object) : object
function execf(fmt:string, ...args, callback:function) : object

pexec()

Similar to exec() but in protected mode:

function pexec(...cmd) : [ok, result]
function pexec(...cmd, opts: object) : [ok, result]
function pexec(...cmd, callback:function) : [ok, result]

Keywords

Dogma

FAQs

Package last updated on 16 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts