UNPKG
@cam-o-man/simpleshell
Version:
latest (1.2.1)
1.2.1
1.2.0
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
A simple function that allows users to run commands directly from JavaScript.
@cam-o-man/simpleshell
/
index.js
5 lines
(4 loc)
•
126 B
JavaScript
View Raw
1
2
3
4
5
const
shell =
require
(
'child_process'
);
exports
.
execute
=
function
(
command, args
) {
return
shell.
spawn
(command, args); };