New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

spawner

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spawner

A fluent interface for launching child processes in Node

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

#Spawner

Intro

A fluent and friendly wrapper for Node's Child Process spawning stuff.

The Code

To install

npm install spawner

In your javascript file.

var spawner = require('spawner');

API

.withArguments( array )

spawner()
  .withArguments(['-a', 'hello'])

Set the arguments to be passed to the executable

.inWorkingDirectory( path )

spawner()
  .withArguments( args )
  .inWorkingDirectory('/path/to/wd')

Defines the working directory for the process to be spawned in.

.onStdout( callback )

spawner()
  .onStdout( callback )

callback gets a stream from the process stdout. By default it is logged to the console.

.onStderr( callback )

spawner() .onStderr( callback )

callback gets a stream from the process stderr. By default it is logged to the console.

.spawn(pathToExecutable, callback)

spawner() .withArguments( args ) .inWorkingDirectory( folder ) .spawn( 'node' , function(err){

    // err = process exit code.

 })

Licence

MIT

Keywords

child_process

FAQs

Package last updated on 08 Mar 2013

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