Socket
Book a DemoInstallSign in
Socket

shell-exec

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shell-exec

Execute a command through the system shell

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
864K
-8.63%
Maintainers
1
Weekly downloads
 
Created
Source

shell-exec

Execute a command through the system shell
npm package version npm downloads standard JS linter prettier code formatting travis ci build status project license make a pull request


Built with ❤︎ by tiaanduplessis and contributors

Table of Contents

Table of Contents
  • About
  • Install
  • Usage
  • API
  • Contribute
  • License
  • About

    A tiny cross-platform promise based wrapper around child_process.spawn.

    Install

    $ npm install shell-exec
    # OR
    $ yarn add shell-exec
    

    Usage

    const shellExec = require('shell-exec')
    
    shellExec('echo Hi!').then(console.log).catch(console.log)
    // Hi!
    // { stdout: '', stderr: '', cmd: 'echo Hi!', code: 0 }
    

    API

    shellExec(command, options)

    Parameters:

    • command {String | Array} - String or Array of commands to run
    • options {Object} - Options object passed to child_process.spawn

    The function then returns a Promise.

    Contributing

    Contributions are welcome!

    • Fork it.
    • Create your feature branch: git checkout -b my-new-feature
    • Commit your changes: git commit -am 'Add some feature'
    • Push to the branch: git push origin my-new-feature
    • Submit a pull request :D

    Or open up a issue.

    License

    Licensed under the MIT License.

    FAQs

    Package last updated on 26 Jun 2017

    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