Server IP : 162.213.251.212 / Your IP : 3.129.250.15 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/allssztx/needapair.com/node_modules/docxtemplater/js/tests/ |
Upload File : |
"use strict"; var repeat = require("./string-repeat.js"); module.exports = function printy(parsed) { var indent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var indentWasNegative = false; var result = parsed.reduce(function (output, p) { var splitted = p.value.split(/(?:\n|\r|\t)(?: |\r|\t)*/g); var value = splitted.join(""); if (value === "") { return output; } if (p.type === "tag" && p.position === "end") { indent--; } if (indent < 0) { indentWasNegative = true; } var i = indent < 0 ? "(".concat(indent, ")") : "(".concat(indent, ")") + repeat(" ", indent); if (p.subparsed) { indent++; var stars = i.replace(/./g, "*"); output += "\n".concat(stars, "START LOOP OF ").concat(value); output += printy(p.subparsed, indent); output += "\n".concat(stars, "END LOOP OF ").concat(value); indent--; } else if (p.type === "placeholder") { output += "\n".concat(i.replace(/./g, "="), "{").concat(value, "}"); } else { output += "\n".concat(i).concat(value); } if (p.type === "tag" && p.position === "start") { indent++; } return output; }, "").split("\n").map(function (line) { return line.replace(/[\s\uFEFF\xA0]+$/g, ""); }).join("\n"); if (indentWasNegative) { var err = new Error("Indent negative"); err.properties = { result: result }; throw err; } return result; };