@savant/cmd
v1.1.0
Published
* @savant/cmd A crossplatform nodejs child_process.exec wrapper with a promise interface.
Downloads
27
Readme
- @savant/cmd A crossplatform nodejs child_process.exec wrapper with a promise interface.
** Install
npm install @savant/cmd
** Usage
const { cmd }= require('@savant/cmd');
cmd('ls -la')
.then((result) => {
console.log(result);
})
.catch((err) => {
console.error(err);
});
// Other syntax:
// cmd(["ls", "-la"])
// cmd([[ "ls", "-la" ], [ "cd", "/tmp" ], [ "ls", "-la"]])