MCPcopy Create free account
hub / github.com/Azure/powershell / toString

Method toString

lib/index.js:61–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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}
85function escapeData(s) {
86 return utils_1.toCommandValue(s)

Callers 15

issueCommandFunction · 0.95
errorFunction · 0.80
warningFunction · 0.80
noticeFunction · 0.80
index.jsFile · 0.80
_processLineBufferMethod · 0.80
prepareRequestMethod · 0.80
prepareRequestMethod · 0.80
readBodyMethod · 0.80
_getOsVersionFunction · 0.80
_readLinuxVersionFileFunction · 0.80
extractTarFunction · 0.80

Calls 2

escapePropertyFunction · 0.85
escapeDataFunction · 0.85

Tested by

no test coverage detected