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

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

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

🐚 shell-exec

package version package downloads standard-readme compliant package license make a pull request

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

Table of Contents

⚙️ Install

Install the package locally within you project folder with your package manager:

With npm:

npm install feature-flip

With yarn:

yarn add feature-flip

With pnpm:

pnpm add feature-flip

📖 Usage

import shellExec from 'shell-exec'
shellExec('echo Hi!').then(console.log).catch(console.log)

📚 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.

See the hosted docs here.

💬 Contributing

Got an idea for a new feature? Found a bug? Contributions are welcome! Please open up an issue or make a pull request.

🪪 License

MIT © Tiaan du Plessis

Keywords

shell-exec

FAQs

Package last updated on 17 May 2022

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