UNPKG
polaris-glints
Version:
latest (15.12.0)
15.12.0
15.11.0
15.10.0
15.9.0
15.8.0
15.7.0
15.6.0
15.5.0
15.4.0
15.3.0
15.2.0
15.1.0
15.0.0
14.0.0
13.0.0
12.0.1
12.0.0
11.0.0
10.19.0
10.18.0
Glints forked polaris react
aries.glints.design
glints-dev/polaris
polaris-glints
/
build
/
cjs
/
utilities
/
clamp.js
12 lines
(8 loc)
•
221 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
'use strict'
;
Object
.
defineProperty
(
exports
,
'__esModule'
, {
value
:
true
});
function
clamp
(
number
, min, max
) {
if
(
number
< min)
return
min;
if
(
number
> max)
return
max;
return
number
; }
exports
.
clamp
= clamp;