MCPcopy Create free account
hub / github.com/anomalyco/opencode / constrain

Function constrain

packages/app/src/addons/serialize.ts:161–163  ·  view source on GitHub ↗
(value: number, low: number, high: number)

Source from the content-addressed store, hash-verified

159// ============================================================================
160
161function constrain(value: number, low: number, high: number): number {
162 return Math.max(low, Math.min(value, high))
163}
164
165function equalFg(cell1: IBufferCell, cell2: IBufferCell): boolean {
166 return cell1.getFgColorMode() === cell2.getFgColorMode() && cell1.getFgColor() === cell2.getFgColor()

Callers 3

_serializeStringMethod · 0.85
serializeAsTextMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected