MCPcopy Create free account
hub / github.com/axhlzy/FridaDebugger / getColumnWidths

Function getColumnWidths

agent/unity-fields.ts:145–151  ·  view source on GitHub ↗
(groups: FieldGroup[])

Source from the content-addressed store, hash-verified

143}
144
145function getColumnWidths(groups: FieldGroup[]): ColumnWidths {
146 const rows = groups.flatMap(group => group.rows);
147 return {
148 typeName: clamp(maxLength(rows.map(row => row.typeName)), 18, 44),
149 name: clamp(maxLength(rows.map(row => row.name)), 18, 42),
150 };
151}
152
153function maxLength(values: string[]): number {
154 return values.reduce((max, value) => Math.max(max, value.length), 0);

Callers 1

logIl2CppFieldsFunction · 0.85

Calls 2

clampFunction · 0.85
maxLengthFunction · 0.85

Tested by

no test coverage detected