Better manage default options
This commit is contained in:
parent
323ec0d529
commit
ab859d4ef5
|
@ -14,7 +14,9 @@ class ProcessWrapper {
|
|||
*
|
||||
* @param {Options} options pingParent: true by default
|
||||
*/
|
||||
constructor(options = {pingParent: true}) {
|
||||
constructor(argOptions = {}) {
|
||||
const defaultOptions = {pingParent: true}
|
||||
const options = {...defaultOptions, ...argOptions};
|
||||
this.interceptLogs();
|
||||
this.events = new Events();
|
||||
if(options.pingParent) {
|
||||
|
|
Loading…
Reference in New Issue