1.0.1 • Published 1 year ago
calculator-app-clase33 v1.0.1
NodeJS Math Operations Library
This NodeJS library provides basic mathematical operations for addition, subtraction, multiplication, and division.
Installation
To install the library, use npm:
npm install math-operations-library
Usage
Import the library into your NodeJS application:
const mathOperations = require('math-operations-library');
Available Operations
sum(a, b): Adds two numbers a and b.
substract(a, b): Subtracts b from a.
multiply(a, b): Multiplies a and b.
divide(a, b): Divides a by b. Throws an error if b is 0.
Example
javascript
const mathOperations = require('math-operations-library');
console.log(mathOperations.sum(5, 3)); // Output: 8
console.log(mathOperations.substract(10, 4)); // Output: 6
console.log(mathOperations.multiply(2, 6)); // Output: 12
console.log(mathOperations.divide(8, 4)); // Output: 2
License
This project is licensed under the MIT License - see the LICENSE file for details.