minmax

calculate the minimum and maximum value

npm install minmax
6 downloads in the last week
13 downloads in the last month

node-minmaxbuild status

Calculate the minimum, maximum value and more.

Example

    var mm = minmax();
    mm(0);
    mm(-4712);
    assert.strictEqual(mm.max, 0);
    assert.strictEqual(mm.min, -4712);
    assert.strictEqual(mm.diff, 4712);
    assert.strictEqual(mm.mean, -2356);
npm loves you