Socket
Socket
Sign inDemoInstall

bound-spawn

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bound-spawn

bind child_process.spawn to a command and configuration


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

bound-spawn

Bind child_process.spawn to a command and configuration.

usage

const node = require(`bound-spawn`)(
  `node`,
  {
    args: {
      alias: {
        eval: `-e`
      }
    }
  }
)

node({ eval: `console.log('hello')` })
.stdout.on(`data`, data => console.log(data.toString()))

api

boundSpawn(command[, configuration])

  • command - <string> the command to run
  • configuration - <Object>
    • args - <Object> configure options-to-args
      • prefix - <string>
      • alias - <Object>
      • behaviour - <Object>
    • options - <Object> same as the options object in the documentation for child_process.spawn.

Returns a function with the following signature:

fn([options])

Returns <ChildProcess>

.args

The options-to-args module

Keywords

FAQs

Package last updated on 25 Mar 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

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