(...args)
| 69 | // cast to string, and object values will be treated as maps from |
| 70 | // option names to values. |
| 71 | args(...args) { |
| 72 | if (this.proc) { |
| 73 | throw new Error("already started?"); |
| 74 | } |
| 75 | |
| 76 | args.forEach((a) => { |
| 77 | if (typeof a !== "object") { |
| 78 | this._args.push(`${a}`); |
| 79 | } else { |
| 80 | Object.keys(a).forEach((key) => { |
| 81 | const value = a[key]; |
| 82 | this._args.push(`--${key}`); |
| 83 | this._args.push(`${value}`); |
| 84 | }); |
| 85 | } |
| 86 | }); |
| 87 | } |
| 88 | |
| 89 | connectClient() { |
| 90 | if (!this.client) { |