$ npm install spawn-please
Easy and small child_process.spawn.
$ npm install --save spawn-please
(
command: string,
args?: string[],
options?: Options,
spawnOptions?: any,
): Promise<{
stdout: string
stderr: string
}>
import spawn from 'spawn-please'
const { stdout, stderr } = await spawn('printf', ['please?'])
assert.equal(stdout, 'please?')
assert.equal(stderr, '')
rejectOnError: boolean - Throws an error if stderr is non-empty. Default: true.stdin: string - Send stdin to the spawned child process.stdout: (data: string) => void - Stream stdout by chunk.stderr: (data: string) => void - Stream stderr by chunk.ISC © Raine Revere
© 2010 - cnpmjs.org x YWFE | Home | YWFE