0.0.7 • Published 9 years ago
lodash-math v0.0.7
lodash.math
Lo-dash extension providing math / stats operations on collections.
It's based on underscore.math which itself is based on Mootools Array.Math
Available methods:
- average (mean)
- gcd
- lcm
- median
- mode
- movingAverage
- power
- product
- round
- scale
- slope
- sort
- stdDeviation (sigma)
- sum
- transpose
- variance
- weightedAverage
- zscore
F.A.Q
What is the difference with the underscore version?
This library uses the implicit chaining capabilities of Lodash.
Released under MIT license
NodeJS usage:
var = require('lodash');
require('lodash-math')();
_.range(15).mean();
or
A lodash will be prodived if none is given. It will not corrupt the main module.
var _math = require('lodash-math')();
or
Other providers can be used.
var = require('underscore');
require('lodash-math')();
.mode(1,2,2.2,3,4,3,Math.round); //Yields 2,3