Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

shellcommand

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shellcommand

A nodejs bash shell command wrapper.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status:

Master Branch:

Build Status

Overview:

ShellCommand is a child_process wrapper for Linux that enables you to execute async shell commands easily from within NodeJS.

How To:

To use ShellCommand, import the ShellCommand class and create an instance. Then use the executeAsync() function to execute the command.

If an error is encountered, the error text from the command is returned, otherwise you will get the output of the command.

Example:

// Use await with try catch or promise().then().catch();

import { ShellCommand } from 'shellcommand';
const pwd = new ShellCommand();
result = await pwd.executeAsync(`pwd`);
console.log(result); // Should return the output of pwd

FAQs

Package last updated on 10 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc