Socket
Socket
Sign inDemoInstall

spawnback

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    spawnback

Simplified process spawning with buffered output in a callback


Version published
Weekly downloads
14K
increased by3.01%
Maintainers
1
Install size
4.56 kB
Created
Weekly downloads
 

Readme

Source

spawnback

Simplified process spawning with buffered output in a callback.

Support this project by donating on Gratipay.

Installation

npm install spawnback

Usage

var spawn = require( "spawnback" );
spawn( "git", [ "status" ], function( error, stdout ) {
	console.log( stdout );
});

API

spawnback follows the same API as node's built-in child_process.spawn(), but accepts a callback as the final parameter. The callback receives three paramaters: an error object, stdout as a string, and stderr as a string.

spawnback( command, [args], [options], callback )

  • command String: The command to run.
  • args Array: List of string arguments.
  • options Object: See the node API docs for full details on which options are supported.
  • callback function( error, stdout, stderr ): A callback to invoke when the child process has ended and all stdio streams have terminated.
  • return: ChildProcess instance.

License

Copyright 2014 Scott González. Released under the terms of the MIT license.


Support this project by donating on Gratipay.

FAQs

Last updated on 25 Apr 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc