simple-calculator-v1

1.0.3 • Public • Published

Calculator Project Documentation

Overview

This project is a simple calculator implemented in JavaScript, allowing users to perform basic arithmetic operations and generate a random ID.

Features

1. Addition

  • Function: add(a, b)
  • Description: Adds two numbers (a and b) and returns the result.

2. Subtraction

  • Function: sub(a, b)
  • Description: Subtracts the second number (b) from the first number (a) and returns the result.

3. Multiplication

  • Function: mul(a, b)
  • Description: Multiplies two numbers (a and b) and returns the result.

4. Division

  • Function: div(a, b)
  • Description: Divides the first number (a) by the second number (b) and returns the result.

5. Random ID Generation

  • Function: uid()
  • Description: Generates a random alphanumeric ID.

Usage

  1. Include the calculator module in your JavaScript project:

    const { add, sub, mul, div, uid } = require('./simple-calculator');

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i simple-calculator-v1

      Weekly Downloads

      1

      Version

      1.0.3

      License

      MIT

      Unpacked Size

      2.02 kB

      Total Files

      3

      Last publish

      Collaborators

      • ebenezr