1.0.1 • Published 9 years ago

summm v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

summm

Build Status Code Climate Version Downloads

Summm safely adds numbers in Javascript by ensuring the values are valid numbers and typecasting them prior to evaluation. This ensures that you actually add numbers instead of concating them.

Install

$ npm install --save summm

Usage

var sum = require('summm')

sum(4, 2)
// => 6

sum('4', 2)
// => 6

sum([4, 2, 1])
// => 7

API

sum(numbers) -> number

numbers

Required Type: number \ array of numbers

The numbers you'd like to get the sum of. Can be an array of numbers or each number provided as an argument.

1.0.1

9 years ago

1.0.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago