Nodejs Array Min min(k)

Here you can find the source of min(k)

Method Source Code

Array.prototype.min = function (k) {
  return Math.min.apply (null, this.column (k));
};

Related

  1. min(array)
    Array.min = function( array ){
        return Math.min.apply( Math, array );
    };
    
  2. min(comparer)
    Array.prototype.min = function(comparer) {
        if (this.length === 0) return null;
        if (this.length === 1) return this[0];
        comparer = (comparer || Math.min);
        var v = this[0];
        for (var i = 1; i < this.length; i++) {
            v = comparer(this[i], v);
        return v;
    ...
    
  3. min(fun)
    Array.prototype.min = function (fun) {
        var min = this[0];
        this.forEach(x => {
            if (fun ? fun(min, x) : (min < x))
                min = x;
        });
        return min;
    };
    
  4. min(funObjectiveValue)
    Array.prototype.min = function (funObjectiveValue) {
        var result = null;
        var min = Number.MAX_VALUE;
        for (var i = 0; i < this.length; i++) {
            var val = funObjectiveValue(this[i]);
            if (val < min) {
                result = this[i];
                min = val;
        return result;
    };
    
  5. min(func)
    Array.prototype.min = function (func) {
        return func === undefined ? Math.min.apply(null, this) : Math.min.apply(null, this.select(func));
    };
    
  6. min(prop)
    Array.prototype.min = function (prop) {
        var min = prop ? this[0][prop] : this[0];
        var len = this.length;
        for (var i = 1; i < len; i++) {
            var item = prop ? this[i][prop] : this[i];
            if (item < min) {
                min = item;
        return min;
    };
    
  7. min(s)
    Array.prototype.min = function (s) {
      s = s || Selector;
      var l = this.length;
      var min = s(this[0]);
      while (l-- > 0)
        if (s(this[l]) < min) min = s(this[l]);
      return min;
    };
    
  8. minimum()
    Array.prototype.minimum = function () {
      return this.reduce(function (min, aValue) {
        return Math.min(min, aValue);
      }, this[0]);
    };
    
  9. minimum()
    Array.prototype.minimum = function()
        var min = this[0];
        for(el in this)
            if(this[el] < min)
                min = this[el] ;
        return min;
    };