Sum utility
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test add basic object support Nov 21, 2012
.gitignore Initial commit Sep 20, 2012
History.md Release 0.1.1 Nov 21, 2012
Makefile Initial commit Sep 20, 2012
Readme.md Initial commit Sep 20, 2012
component.json Release 0.1.1 Nov 21, 2012
index.js add basic object support Nov 21, 2012
package.json add repository field to readme Aug 21, 2013

Readme.md

sum

Sum utility

Installation

$ component install component/sum

API

sum(array, [fn|string])

Sum an array of numbers:

sum([1,2,3,4,5]);

Sum properties with callback:

var sum = sum(users, function(user){
  return user.age;
});

map(array, string)

Sum properties in string:

sum(users, 'age');
sum(repos, 'stats.watchers');

License

MIT