Hello Number Cruncher! 🧮
The @ryvora/number
package provides handy utilities for working with numbers in JavaScript/TypeScript. Perfect for math helpers, value clamping, and more.
It's like having a math assistant for your code!
- Clamp values within a range
- Build UI components that need numeric constraints
- Simplify math operations in your codebase
It provides a clamp
function to restrict a number within a given range.
import { clamp } from '@ryvora/number';
const value = clamp(15, [0, 10]); // value === 10
Keep your numbers in check and your logic clean! ✨
pnpm add @ryvora/number
MIT