()
| 59 | this.message = message; |
| 60 | } |
| 61 | toString() { |
| 62 | let cmdStr = CMD_STRING + this.command; |
| 63 | if (this.properties && Object.keys(this.properties).length > 0) { |
| 64 | cmdStr += ' '; |
| 65 | let first = true; |
| 66 | for (const key in this.properties) { |
| 67 | if (this.properties.hasOwnProperty(key)) { |
| 68 | const val = this.properties[key]; |
| 69 | if (val) { |
| 70 | if (first) { |
| 71 | first = false; |
| 72 | } |
| 73 | else { |
| 74 | cmdStr += ','; |
| 75 | } |
| 76 | cmdStr += `${key}=${escapeProperty(val)}`; |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | cmdStr += `${CMD_STRING}${escapeData(this.message)}`; |
| 82 | return cmdStr; |
| 83 | } |
| 84 | } |
| 85 | function escapeData(s) { |
| 86 | return utils_1.toCommandValue(s) |
no test coverage detected