🚀 Launch Week Day 3:Introducing Supply Chain Attack Campaigns Tracking.Learn More →
Socket
Book a DemoInstallSign in
Socket

array-sum

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-sum

Add up all of the numbers in an array of numbers. Works when non-numbers are present as well.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

array-sum NPM version

Add up all of the numbers in an array of numbers. Works when non-numbers are present as well.

Install

Install with npm:

npm i array-sum --save-dev

Usage

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

Jon Schlinkert

License

Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license

This file was generated by verb on January 14, 2015.

Keywords

add

FAQs

Package last updated on 15 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts