# return-sum

> This is a math package , it can add up multiple numbers and return a sum.

Latest version **1.2.0** (published 2022-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install return-sum
pnpm add return-sum
yarn add return-sum
bun add return-sum
```

## 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 | 1.2.0 |
| Published | 2022-05-21 |
| First published | 2022-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | gn01792218 |
| Maintainers | gn01792218 |
| Keywords | sum |

## Links

- npm: https://www.npmjs.com/package/return-sum
- Repository: https://github.com/gn01792218/sum
- Homepage: https://github.com/gn01792218/sum#readme
- Issues: https://github.com/gn01792218/sum/issues
- npm.io page: https://npm.io/package/return-sum

## Recent versions

- 1.2.0 (latest) — 2022-05-21
- 1.1.0 — 2022-05-07
- 1.1.3 — 2022-05-07
- 1.1.2 — 2022-05-07
- 1.0.2 — 2022-05-07
- 1.0.1 — 2022-05-07
- 1.0.0 — 2022-05-07

## README

## Install
Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save return-sum
```

## Usage
### sum()
The sum() function can add multiple parameters and return the sum.
**Just work with numbers.
```js
const {sum} = require('return-sum');
console.log(sum()) //=>0
console.log(sum(1,2)) //=>3
console.log(sum(1,2,3)) //=>6
```
**If the parameters is not type of number, it would counts 0 for that parameters.
```js
console.log(sum("1",2)) //=>2
``` 
### sumArr()
if you want to send an number array ,you should use this one,the sumArr() function takes in an array and return the sum.
**each item of array should be number,or it would counts 0 for that item.
```js
const {sumArr} = require('return-sum');
console.log(sumArr([-1,1,3])) //3
console.log(sumArr(["a","1",2])) //2
```
### Author

**Meng Tse Houng**

* [GitHub Profile](https://github.com/gn01792218)

### License

Copyright © 2022, [Meng Tse Houng](https://github.com/gn01792218).
Released under the [MIT License](LICENSE).

***

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