JSPM

array-sum

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 296
  • Score
    100M100P100Q72821F
  • License

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

Package Exports

  • array-sum

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-sum) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.