Readonly
stdoutEvent emitter for the stdout
. Emits the data
event.
Readonly
stderrEvent emitter for the stderr
. Emits the data
event.
Alias for emitter.on(eventName, listener)
.
Alias for emitter.off(eventName, listener)
.
Adds the listener
function to the end of the listeners array for the
event named eventName
. No checks are made to see if the listener
has
already been added. Multiple calls passing the same combination of eventName
and listener
will result in the listener
being added, and called, multiple
times.
Returns a reference to the EventEmitter
, so that calls can be chained.
Adds a one-timelistener
function for the event named eventName
. The
next time eventName
is triggered, this listener is removed and then invoked.
Returns a reference to the EventEmitter
, so that calls can be chained.
Removes the all specified listener from the listener array for the event eventName
Returns a reference to the EventEmitter
, so that calls can be chained.
Removes all listeners, or those of the specified eventName.
Returns a reference to the EventEmitter
, so that calls can be chained.
Optional
event: NReturns the number of listeners listening to the event named eventName
.
Adds the listener
function to the beginning of the listeners array for the
event named eventName
. No checks are made to see if the listener
has
already been added. Multiple calls passing the same combination of eventName
and listener
will result in the listener
being added, and called, multiple
times.
Returns a reference to the EventEmitter
, so that calls can be chained.
Adds a one-timelistener
function for the event named eventName
to the_beginning_ of the listeners array. The next time eventName
is triggered, this
listener is removed, and then invoked.
Returns a reference to the EventEmitter
, so that calls can be chained.
Static
createOptional
args: string | string[]Optional
args: string | string[]Optional
options: SpawnOptions & { encoding: "raw" }Optional
args: string | string[]Optional
options: SpawnOptionsStatic
sidecarOptional
args: string | string[]Optional
args: string | string[]Optional
options: SpawnOptions & { encoding: "raw" }Optional
args: string | string[]Optional
options: SpawnOptionsExecutes the command as a child process, waiting for it to finish and collecting all of its output.
A promise resolving to the child process output.
The entry point for spawning child processes. It emits the
close
anderror
events.Example
Since
2.0.0