# @talk2rajeev/simple-calculator

> add, substrct, divide and multiply

Latest version **3.0.51** (published 2021-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @talk2rajeev/simple-calculator
pnpm add @talk2rajeev/simple-calculator
yarn add @talk2rajeev/simple-calculator
bun add @talk2rajeev/simple-calculator
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.51 |
| Published | 2021-09-24 |
| First published | 2018-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rajeev Sharma |
| Maintainers | talk2rajeev |
| Keywords | calculator, npm |

## Links

- npm: https://www.npmjs.com/package/@talk2rajeev/simple-calculator
- Repository: https://github.com/talk2rajeev/simple-calculator
- Homepage: https://github.com/talk2rajeev/simple-calculator#readme
- Issues: https://github.com/talk2rajeev/simple-calculator/issues
- npm.io page: https://npm.io/package/@talk2rajeev/simple-calculator

## Recent versions

- 3.0.51 (latest) — 2021-09-24
- 3.0.5 — 2021-09-24
- 3.0.4 — 2021-09-23
- 3.0.3 — 2021-09-23
- 3.0.2 — 2021-09-23
- 3.0.1 — 2021-09-08
- 2.1.0 — 2021-09-08
- 3.0.0 — 2018-08-24
- 2.0.0 — 2018-08-24
- 1.0.0 — 2018-08-24

## README

# simple-calculator

[![GitHub issues](https://img.shields.io/github/issues/talk2rajeev/simple-calculator.svg)](https://github.com/talk2rajeev/simple-calculator/issues)

## install
```
npm i @talk2rajeev/simple-calculator
```

## How to Use

### addition
```javascript
import module from '@talk2rajeev/simple-calculator'
```

#### addition
addition takes multiple argument, all argument will be added together.
```javascript
const { add, substract, multiply, divide } = module;

add(1,2) //Output: 3
add(1,2,3,4) //Output: 10
```

#### substract
substract takes multiple argument, all argument (except 1st) will be substrated from 1st one
```javascript
substract(4,2) //output: 2

substract(10,2,1) //output: 7
Explanation: 10 -2 -1 = 7
```

#### Multiplication
multiply takes multiple argument, all argument will be multiplied together.
```javascript
multiply(3,2) //output: 6

multiply(10,2,5) //output: 100
Explanation: 10 * 2 * 5 = 100
```


#### Division
division takes only 2 arguments
```javascript
divide(8,2) //output: 4
divide(10,2) //output: 100
```

#### Power
```javascript
power(2)(3) //output: 8
power(3)(4) //output: 81
```


#### Square Root

```javascript
squareRoot(2); //Output: 1.4142135623730951
squareRoot(4); //Output: 2
squareRoot(9); //Output: 3
```

#### Cube Root

```javascript
cubeRoot(3); //Output: 1.4422495703074083
cubeRoot(8); //Output: 2
cubeRoot(27); //Output: 3
```

---
_Source: https://npm.io/package/@talk2rajeev/simple-calculator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
