README
arrayrange
A simple, lightweight utility which calculates the minimum and maximum values in an array, and the range between the values.
Installation
npm install arrayrange
Usage
A full guide to the API can be found here.
Minimum value
var arrayRange = require('arrayrange');
var min = arrayRange.min(someArray);
Maximum value
var arrayRange = require('arrayrange');
var max = arrayRange.max(someArray);
Range
var arrayRange = require('arrayrange');
var range = arrayRange.range(someArray);
Improvements
I'm planning to add the following functionality:
- Handling string arrays (min, max and range)
- Handling arrays with mixed types (in a sensible and/or customisable way)
Contributions and Issues
If you notice any issues please log them, and contributions are always welcome.