UNPKG

qsu

Version:

qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.

1 lines 238 B
import{exec as e}from"child_process";import{EOL as n}from"os";export function runCommand(o){return new Promise((r,i)=>{const s=e(o,{encoding:"utf8",windowsHide:!0},(e,o)=>{e?i(e):(s?.stdin?.end(),r(o.replace(new RegExp(`${n}$`),"")))})})}