A tiny spawn wrapper.
import exec from '@webpod/exec'
const {ls, curl} = exec
const list = ls('-la').trim().split('\n')
const resp = curl('https://medv.io')npm i @webpod/execImport any binary you would like to call. Use it like a function.
import exec from '@webpod/exec'
const {cat} = exec
const content = cat('README.md')To get exit code or stderr, use .status or .stderr.
const {git} = exec
console.log(git('pull').status)To pass options to the spawn, bind to an options object.
const {tee} = exec
tee.call({input: 'Hello, world!'}, 'file.txt')MIT