New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

maths_b

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

maths_b

A sample npm package

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
1
Maintainers
0
Weekly downloads
 
Created
Source

my-npm-package

A simple npm package for math utilities.

Installation

npm install maths_b

or 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: 6

CommonJS 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 a and b.
  • Parameters:
    • a (number) – First number.
    • b (number) – Second number.
  • Returns: number – Sum of a and b.
  • Example:
    add(2, 3); // 5
    

substract(a, b)

  • Description: Returns the result of subtracting b from a.
  • Parameters:
    • a (number) – First number.
    • b (number) – Number to subtract.
  • Returns: number – Difference of a and b.
  • 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 your-email@example.com.

Keywords

math

FAQs

Package last updated on 01 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts