Socket
Socket
Sign inDemoInstall

node-cmd

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

cmd.js

8

package.json
{
"name": "node-cmd",
"version": "1.0.1",
"description": "Simple commandline interface to allow you to run cli or bash style commands as if you were in the terminal.",
"main": "commandline.js",
"version": "1.0.2",
"description": "Simple commandline/terminal interface to allow you to run cli or bash style commands as if you were in the terminal.",
"main": "cmd.js",
"directories": {

@@ -25,3 +25,3 @@ "example": "example"

"author": "Brandon Nozaki Miller",
"license": "Unlicense",
"license": "DBAD",
"bugs": {

@@ -28,0 +28,0 @@ "url": "https://github.com/RIAEvangelist/node-cmd/issues"

@@ -1,5 +0,38 @@

commandline
===========
*Node.js commandline interface.*
#node-cmd
-
*Node.js commandline/terminal interface.*
Run cli commands asynchronously, and if needed, get the output as a string or just run the command and ignore the output.
Simple commandline or terminal interface to allow you to run cli or bash style commands as if you were in the terminal.
Run commands asynchronously, and if needed can get the output as a string.
#Methods
-
|method | arguments | functionality |
|-------|-----------|---------------|
|run | command | runs a command asynchronously|
|get | command,callback | runs a command asynchronously, when the command is complete all of the stdout will be passed to the callback|
#Examples
-
var cmd=require('node-cmd');
cmd.get(
'pwd',
function(data){
console.log('the current working dir is : ',data)
}
);
cmd.run('touch example.created.file');
cmd.get(
'ls',
function(data){
console.log('the current dir contains these files :\n\n',data)
}
);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc