@saggio/simple-calculator
v1.0.3
Published
A lightweight JavaScript calculator library providing essential math utilities like add, subtract, multiply, divide, modulus, power, and more. Designed for easy integration in modern projects.
Maintainers
Readme
Features
➕ Addition: Perform quick and accurate addition of numbers.
➖ Subtraction: Easily subtract one number from another.
✖️ Multiplication: Multiply integers and decimals with precision.
➗ Division with Error Handling:
- Handles division of numbers.
- Throws a clear error when attempting to divide by zero.
🔢 Extra Math Utilities:
- Modulus (remainder calculation)
- Power (exponentiation)
- Square root (with validation for negative inputs)
- Percentage calculation
- Average of multiple numbers
- Absolute value
🛠 Lightweight and Modular:
- Pure JavaScript implementation.
- No external runtime dependencies.
📦 ES Module & UMD Support:
- Works seamlessly with modern bundlers (Webpack, Rollup, Vite).
- Can also be used directly in browser environments.
✅ Production Ready:
- Minified builds (<10kb gzipped).
- Ready for deployment to npm.
