Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TruthHun/BookStack
/ clamp
Function
clamp
static/nprogress/nprogress.js:300–304 ·
view source on GitHub ↗
* Helpers
(n, min, max)
Source
from the content-addressed store, hash-verified
298
*/
299
300
function
clamp(n, min, max) {
301
if
(n < min)
return
min;
302
if
(n > max)
return
max;
303
return
n;
304
}
305
306
/**
307
* (Internal) converts a percentage (`0..1`) to a bar translateX
Callers
1
nprogress.js
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected