403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/framework7/cordova/node_modules/endent/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/framework7/cordova/node_modules/endent/lib/index.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const dedent_1 = __importDefault(require("dedent"));
const objectorarray_1 = __importDefault(require("objectorarray"));
const fast_json_parse_1 = __importDefault(require("fast-json-parse"));
const ENDENT_ID = "twhZNwxI1aFG3r4";
function endent(strings, ...values) {
    let result = "";
    for (let i = 0; i < strings.length; i++) {
        result += strings[i];
        if (i < values.length) {
            let value = values[i];
            let isJson = false;
            if (fast_json_parse_1.default(value).value) {
                value = fast_json_parse_1.default(value).value;
                isJson = true;
            }
            if ((value && value[ENDENT_ID]) || isJson) {
                let rawlines = result.split("\n");
                let l = rawlines[rawlines.length - 1].search(/\S/);
                let endentation = l > 0 ? " ".repeat(l) : "";
                let valueJson = isJson
                    ? JSON.stringify(value, null, 2)
                    : value[ENDENT_ID];
                let valueLines = valueJson.split("\n");
                valueLines.forEach((l, index) => {
                    if (index > 0) {
                        result += "\n" + endentation + l;
                    }
                    else {
                        result += l;
                    }
                });
            }
            else if (typeof value === "string" && value.includes("\n")) {
                let endentations = result.match(/(?:^|\n)( *)$/);
                if (typeof value === "string") {
                    let endentation = endentations ? endentations[1] : "";
                    result += value
                        .split("\n")
                        .map((str, i) => {
                        str = ENDENT_ID + str;
                        return i === 0 ? str : `${endentation}${str}`;
                    })
                        .join("\n");
                }
                else {
                    result += value;
                }
            }
            else {
                result += value;
            }
        }
    }
    result = dedent_1.default(result);
    return result.split(ENDENT_ID).join("");
}
endent.pretty = (data) => {
    return objectorarray_1.default(data)
        ? { [ENDENT_ID]: JSON.stringify(data, null, 2) }
        : data;
};
exports.default = endent;

Youez - 2016 - github.com/yon3zu
LinuXploit