MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / aD

Function aD

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

Source from the content-addressed store, hash-verified

64837 let e3 = c(p(p({}, z), E4), { contentWidth: D5[t2] });
64838 e3.horizontalPadding = e3.paddingLeft + e3.paddingRight, u3.push(e3);
64839 continue;
64840 }
64841 throw new Error(`Invalid column width: ${JSON.stringify(E4)}`);
64842 }
64843 return u3;
64844};
64845function aD(D5, F5) {
64846 for (let u3 of D5) {
64847 let { width: C5 } = u3;
64848 if (C5 === "content-width" && (u3.width = u3.contentWidth), C5 === "auto") {
64849 let n2 = Math.min(20, u3.contentWidth);
64850 u3.width = n2, u3.autoOverflow = u3.contentWidth - n2;
64851 }
64852 if (typeof C5 == "string" && _2.test(C5)) {
64853 let n2 = Number.parseFloat(C5.slice(0, -1)) / 100;
64854 u3.width = Math.floor(F5 * n2) - (u3.paddingLeft + u3.paddingRight);
64855 }
64856 let { horizontalPadding: t2 } = u3, E4 = 1, e3 = E4 + t2;
64857 if (e3 >= F5) {
64858 let n2 = e3 - F5, o3 = Math.ceil(u3.paddingLeft / t2 * n2), B3 = n2 - o3;
64859 u3.paddingLeft -= o3, u3.paddingRight -= B3, u3.horizontalPadding = u3.paddingLeft + u3.paddingRight;
64860 }
64861 u3.paddingLeftString = u3.paddingLeft ? " ".repeat(u3.paddingLeft) : "", u3.paddingRightString = u3.paddingRight ? " ".repeat(u3.paddingRight) : "";
64862 let r3 = F5 - u3.horizontalPadding;

Callers 1

ZFunction · 0.85

Calls 4

testMethod · 0.80
minMethod · 0.45
sliceMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected