Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

301 B
Raw Blame
export interface ClampEditorHeightOptions {
  lineCount: number;
  lineHeight: number;
  min: number;
  max: number;
}

export function clampEditorHeight({
  lineCount,
  lineHeight,
  min,
  max,
}: ClampEditorHeightOptions): number {
  return Math.min(max, Math.max(min, lineCount * lineHeight));
}