1.0.5 • Published 5 years ago

create-spawn v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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