@19h47/clamp 中文文档教程
@19h47/clamp
@19h47/clamp 是一个小模块,用于将数字限制在上限和下限之间。
import clamp from '@19h47/clamp';
clamp(100, 0, 50); // 50
Test
yarn test
@19h47/clamp
@19h47/clamp is a small module to clamp a number between an upper and lower bound.
import clamp from '@19h47/clamp';
clamp(100, 0, 50); // 50
Test
yarn test