Find Similar Packages for spawn-sync
spawn-syncSimilar Packages:
Npm Package Weekly Downloads Trend
3 Years
🌟 Show real-time usage chart on spawn-sync's README.md, just copy the code below.
## Usage Trend
[![Usage Trend of spawn-sync](https://npm-compare.com/img/npm-trend/THREE_YEARS/spawn-sync.png)](https://npm-compare.com/spawn-sync#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 Show GitHub stars trend chart on spawn-sync's README.md, just copy the code below.
## GitHub Stars Trend
[![GitHub Stars Trend of spawn-sync](https://npm-compare.com/img/github-trend/spawn-sync.png)](https://npm-compare.com/spawn-sync)
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
spawn-sync1,139,19636-07 years agoMIT
README for spawn-sync

spawn-sync

This used to be a polyfill for require('child_process').spawnSync but now all actively maintained node versions already support spawnSync, so this is just a stub that re-exports spawnSync.

Usage

You should remove this library from your dependencies and just do:

var spawnSync = require('child_process').spawnSync;

var result = spawnSync('node',
                       ['filename.js'],
                       {input: 'write this to stdin'});

if (result.status !== 0) {
  process.stderr.write(result.stderr);
  process.exit(result.status);
} else {
  process.stdout.write(result.stdout);
  process.stderr.write(result.stderr);
}

License

MIT