bound-spawn
v2.0.0
Published
bind child_process.spawn to a command and configuration
Downloads
11
Maintainers
Readme
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 runconfiguration
- <Object>args
- <Object> configure options-to-argsprefix
- <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])
options
- <Object> passed on to options-to-args
Returns <ChildProcess>
.args
The options-to-args module