MCPcopy
hub / github.com/di-sukharev/opencommit / P

Function P

out/cli.cjs:65002–65030  ·  view source on GitHub ↗
(D5, F5)

Source from the content-addressed store, hash-verified

65000};
65001function T2(D5, F5, u3) {
65002 return String(D5).normalize().replace(/\r\n/g, `
65003`).split(`
65004`).map((C5) => dD(C5, F5, u3)).join(`
65005`);
65006}
65007var X = (D5) => Array.from({ length: D5 }).fill("");
65008function P(D5, F5) {
65009 let u3 = [], C5 = 0;
65010 for (let t2 of D5) {
65011 let E4 = 0, e3 = t2.map((n2) => {
65012 var a4;
65013 let o3 = (a4 = F5[C5]) != null ? a4 : "";
65014 C5 += 1, n2.preprocess && (o3 = n2.preprocess(o3)), b2(o3) > n2.width && (o3 = T2(o3, n2.width, { hard: true }));
65015 let B3 = o3.split(`
65016`);
65017 if (n2.postprocess) {
65018 let { postprocess: s2 } = n2;
65019 B3 = B3.map((l3, h4) => s2.call(n2, l3, h4));
65020 }
65021 return n2.paddingTop && B3.unshift(...X(n2.paddingTop)), n2.paddingBottom && B3.push(...X(n2.paddingBottom)), B3.length > E4 && (E4 = B3.length), c(p({}, n2), { lines: B3 });
65022 }), r3 = [];
65023 for (let n2 = 0; n2 < E4; n2 += 1) {
65024 let o3 = e3.map((B3) => {
65025 var h4;
65026 let a4 = (h4 = B3.lines[n2]) != null ? h4 : "", s2 = Number.isFinite(B3.width) ? " ".repeat(B3.width - g(a4)) : "", l3 = B3.paddingLeftString;
65027 return B3.align === "right" && (l3 += s2), l3 += a4, B3.align === "left" && (l3 += s2), l3 + B3.paddingRightString;
65028 }).join("");
65029 r3.push(o3);
65030 }
65031 u3.push(r3.join(`
65032`));
65033 }

Callers 1

mDFunction · 0.85

Calls 8

b2Function · 0.85
T2Function · 0.85
XFunction · 0.85
cFunction · 0.85
pFunction · 0.85
gFunction · 0.85
isFiniteMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected