sum-component

Sum utility

sum

Sum utility

$ component install component/sum

Sum an array of numbers:

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

Sum properties with callback:

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

Sum properties in string:

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

License

MIT