@nikhildhoka8/dummy_package
v1.0.1
Published
A package that multiplies two numbers
Downloads
145
Readme
@nikhildhoka8/dummy_package
A simple NPM package that multiplies two numbers.
Installation
You can install the package using NPM:
npm install @nikhildhoka8/dummy_package
Usage
After installing the package, you can import it into your project and use it as follows:
const multiply = require('@nikhildhoka8/dummy_package');
const result = multiply(4, 5);
console.log(result); // Output: 20
Example
const multiply = require('@nikhildhoka8/dummy_package');
console.log(multiply(2, 3)); // Output: 6
console.log(multiply(10, 0)); // Output: 0
console.log(multiply(-4, 7)); // Output: -28
API
multiply(a, b)
Multiplies two numbers a
and b
.
Parameters:
a
: A number (required)b
: A number (required)
Returns:
- The product of
a
andb
.
- The product of
Throws:
- If either
a
orb
is not a number, the function throws an error.
- If either
License
This project is licensed under the ISC License. See the LICENSE file for more details.