🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

sum.js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sum.js

Sum a list of number literals, nested object property values, or values returned from a custom function for Node.js and the browser.

latest
Source
npmnpm
Version
0.6.0
Version published
Maintainers
1
Created
Source

sum.js

Build Status NPM version NPM downloads LICENSE

Sum a list of number literals, nested object property values, or values returned from a custom function for Node.js and the browser.

Examples

Number literals

sum([1, 2, 3, 4]);
//=> 10

Nested object properties

var strings = ['literal', 'constructor'];
sum(strings, 'length');
//=> 18

Custom function

sum([1, 2, 3, 4], function (n) { n * 60 });
//=> 600

Installation

component

$ component install wilmoore/sum.js

bower

$ bower install sum.js

npm

NPM

volo

$ volo add wilmoore/sum.js

manual

  • download

     % curl -#O https://raw.github.com/wilmoore/sum.js/master/sum.min.js
     or
     % curl -#O https://raw.github.com/wilmoore/sum.js/master/sum.js
    
  • use

     <script src="sum.min.js"></script>
     or
     <script src="sum.js"></script>
    

License

MIT

Keywords

sum

FAQs

Package last updated on 14 Nov 2014

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