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

prom-spawn

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prom-spawn

Spawns processes that can be used in chained promises

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

Alternative solutions

  • https://github.com/bitsofinfo/stateful-process-command-proxy
  • https://gist.github.com/millermedeiros/4724047

Examples

// basic usage
var p = require('prom-spawn');

// note that p() returns a function that returns a promise
p('rm', '-rf', 'tmpfolder')().then(function() {
  console.log('Success!');
});
// chaining commands
var p = require('prom-spawn');
p('createdb', 'mydb', '-T', 'template_db')()
  .then(p('psql', 'mydb', '-c', 'DELETE FROM mytable WHERE 1=1'))
  .then(('sed','-i','s/good/such wow/g','doge.txt'));

Keywords

promise

FAQs

Package last updated on 27 Apr 2015

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