UNPKG

await-exec

Version:

Small promise wrapper around node's `child_process#exec` allowing you to use async/await syntax for commands you want to execute.

10 lines (7 loc) 159 B
const exec = require('./') async function logger (text) { await exec(`echo ${text}`, { log: true }) } for (let k = 0; k < 10; k++) { logger('worked!') }