lcm-calculator
v1.0.0
Published
Calculate the LCM between any given integer numbers
Downloads
14
Maintainers
Readme
LCM Calculator
Calculates the lcm for multiple provided integer numbers.
Installation`
npm install lcm-calculatorUsage
import { lcm } from "lcm-calculator";
const lcm_result = lcm(11, 22, 33, 44);
console.log(lcm_result); // 132Only non-zero and positive integers are accepted as valid arguments. Trying to pass invalid arguments will eventually lead to errors on your program, as in the example:
import { lcm } from "lcm-calculator";
// TypeError: Expect only positive and non-zero values as arguments
const lcm_result = lcm(49, 57, 131, -12);
// TypeError: Expect only integer numbers as arguments
const lcm_result = lcm(23, 90, 1.5);Development
After cloning the repository, run npm install to install the necessary packages to the development.
