`;
+ // 1. Normal parameter
+ if (typeof params[key] !== "object") {
+ if (params[key].length > 100) {
+ html += `
+
${key}: ${params[key].substring(0, 100) + "..." || "true"}
+ `;
+ } else {
+ html += `
+
${key}: ${params[key] || "true"}
+ `;
+ }
+ } else {
+ // 2. This parameter is an Object, we need to loop its internal subparams.
+ let nestedObject = "";
+ // 2.1 It can contain some subparams, or ...
+ if (UtilsNew.isNotEmpty(params[key])) {
+ for (const subKey of Object.keys(params[key])) {
+ nestedObject += `
+
+ ${subKey}: ${params[key][subKey]}
+
+ `;
+ }
+ html += `
+
+ ${key}:
+
+
+ ${nestedObject}
`;
+ } else {
+ // 2.2 ... it can be an empty object.
+ html += `
+
${key}:none
+ `;
}
}
- html += `
-
- ${nestedObject ? `
-
${key}:
-
- ${nestedObject}
-
` :
- `
${key}: ${params[key]}`}
-
- `;
+ html += "