rxjs-child-process

1.0.4 • Public • Published

rxjs-child-process

NodeJS child_process fork and spawn as rxjs6+ observables.

NPM

Installation

npm install --save rxjs-child-process

// Or

yarn add rxjs-child-process

spawn

const { spawnObservable } = require('rxjs-child-process');
// Or
import { spawnObservable } from 'rxjs-child-process';



spawnObservable('rm', ['-rf', '/var']).subscribe(
  msg => console.log(msg),
  err => console.err(err),
);

fork

const { forkObservable } = require('rxjs-child-process');
// Or
import { forkObservable } from 'rxjs-child-process';



forkObservable('./script.js', ['--path', './some/path']).subscribe(
  msg => console.log(msg),
  err => console.err(err),
);

Package Sidebar

Install

npm i rxjs-child-process

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

8.42 kB

Total Files

9

Last publish

Collaborators

  • morefox