Comment by metaphorm
11 years ago
here is the source for that npm package
https://github.com/bytespider/average/blob/master/src/averag...
and here is the code copied out in full
module.exports = function average(values) { for (var i = 0, sum = 0; i < values.length; ++i) { sum += values[i]; } return sum / values.length; };
is this worth adding a dependency to your build for?
No comments yet
Contribute on Hacker News ↗