min.js 302 B

1234567891011121314
  1. var helperCreateMinMax = require('./helperCreateMinMax')
  2. /**
  3. * 获取最小值
  4. *
  5. * @param {Array} arr 数组
  6. * @param {Function} iterate(item, index, obj) 回调
  7. * @return {Number}
  8. */
  9. var min = helperCreateMinMax(function (rest, itemVal) {
  10. return rest > itemVal
  11. })
  12. module.exports = min