create-spawn

1.0.5 • Public • Published

Create Spawn

A simple package to handle child_process.spawn in a practical way

Install

NPM

  • Use: require('create-spawn')
  • Install: npm install --save create-spawn

YARN

  • Use: require('create-spawn')
  • Install: yarn add create-spawn

Usage

Example

 
const createSpawn = require('create-spawn')
 
(() => {
  const { stdout, stderr } = createSpawn`
    echo ${'test test test'}
  `
  /*
    Or createSpawn('echo', ['test test test'])
  */
 
  stdout // Stream
  stderr // Stream
 
 
})()
 

Example 2

 
const createSpawn = require('create-spawn')
 
(async () => {
  const { stdout, stderr, all } = await createSpawn`
    echo ${'test test test'}
  `
 
  stdout // String
  stderr // String
 
 
})()
 

License

Licensed under permissive MIT license

Package Sidebar

Install

npm i create-spawn

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

4.13 kB

Total Files

7

Last publish

Collaborators

  • nneutrinno