max.js 249 B

123456789101112
  1. var arrMax = require('../array/max');
  2. var values = require('./values');
  3. /**
  4. * Returns maximum value inside object.
  5. */
  6. function max(obj, compareFn) {
  7. return arrMax(values(obj), compareFn);
  8. }
  9. module.exports = max;