array-sum
Version:
Add up all of the numbers in an array of numbers. Works when non-numbers are present as well.
32 lines (21 loc) • 404 B
Markdown
# {%= name %} {%= badge("fury") %}
> {%= description %}
## Install
{%= include("install") %}
## Usage
```js
var arraySum = require('array-sum');
arraySum([1, 2, 3, 4, 5]);
//=> 15
arraySum(['1', '2', 3, '4', 5]);
//=> 15
arraySum([1, 'foo', 2, 3, 4, {}, 5]);
//=> 15
```
## Author
{%= include("author") %}
## License
{%= copyright({year: 2014}) %}
{%= license() %}
***
{%= include("footer") %}