maths_b
v1.0.2
Published
A sample npm package
Readme
my-npm-package
A simple npm package for math utilities.
Installation
npm install maths_bor using yarn:
yarn add maths_b📖 Usage
Import and use the package in your JavaScript project:
ES6+ Import
import { add, substract } from "maths_b";
console.log(add(5, 3)); // Output: 8
console.log(substract(10, 4)); // Output: 6CommonJS Import
const { add, substract } = require("maths_b");
console.log(add(5, 3)); // Output: 8
console.log(substract(10, 4)); // Output: 6📌 API Reference
add(a, b)
- Description: Returns the sum of
aandb. - Parameters:
a(number) – First number.b(number) – Second number.
- Returns:
number– Sum ofaandb. - Example:
add(2, 3); // 5
substract(a, b)
- Description: Returns the result of subtracting
bfroma. - Parameters:
a(number) – First number.b(number) – Number to subtract.
- Returns:
number– Difference ofaandb. - Example:
substract(10, 4); // 6
🔥 Features
✅ Simple and lightweight
✅ Supports CommonJS and ES6+
✅ Works in Node.js and browser
🛠️ Contributing
We welcome contributions! Follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-name). - Make changes and commit (
git commit -m "Add new feature"). - Push to your branch (
git push origin feature-name). - Open a pull request.
📜 License
This project is licensed under the MIT License.
📞 Support & Contact
For any issues, please open an issue or contact me at [email protected].
