UNPKG

baseui

Version:

A React Component library implementing the Base design language

16 lines (14 loc) 397 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.clamp = clamp; /* Copyright (c) Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ // Clamp a number between a min and max function clamp(num, minNum, maxNum) { return Math.min(Math.max(num, minNum), maxNum); }