MCPcopy Create free account
hub / github.com/denoland/std / clamp

Function clamp

cli/unstable_progress_bar.ts:109–111  ·  view source on GitHub ↗
(value: number, min: number, max: number)

Source from the content-addressed store, hash-verified

107}
108
109function clamp(value: number, min: number, max: number) {
110 return Math.min(Math.max(value, min), max);
111}
112
113/**
114 * `ProgressBar` is a customisable class that reports updates to a

Callers 1

Calls 2

minMethod · 0.80
maxMethod · 0.80

Tested by

no test coverage detected