2.5.0 • Published 3 years ago

@kwsites/math-sum v2.5.0

Weekly downloads
2,437
License
MIT
Repository
github
Last release
3 years ago

@kwsites/math-sum

A lightweight library for summing numbers together.

Usage

Install using npm npm install @kwsites/math-sum or yarn then use with require:

import { sum } from '@kwsites/math-sum';

const numbers = [123, 456, 789];
const count = sum(numbers);

assert(count === 1368);

If the name sum clashes with your own variable naming, and you prefer not to alias in your imports, you can use its alias sumOf;

import { sumOf } from '@kwsites/math-sum';

const numbers = [123, 456, 789];
const sum = sumOf(numbers);

assert(sum === 1368);
2.5.0

3 years ago

2.4.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago