0.6.0 • Published 9 years ago

sum.js v0.6.0

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

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

  1. 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
  2. use

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

License

MIT

0.6.0

9 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago